mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 06:31:57 +00:00
rpc: clean up the RPCFunc constructor signature (#7586)
Instead of taking a comma-separated string of parameter names, take each parameter name as a separate argument. Now that we no longer have an extra flag for caching, this fits nicely into a variadic trailer. * Update all usage of NewRPCFunc and NewWSRPCFunc.
This commit is contained in:
@@ -135,7 +135,7 @@ func TestParseJSONArray(t *testing.T) {
|
||||
|
||||
func TestParseJSONRPC(t *testing.T) {
|
||||
demo := func(ctx context.Context, height int, name string) {}
|
||||
call := NewRPCFunc(demo, "height,name")
|
||||
call := NewRPCFunc(demo, "height", "name")
|
||||
|
||||
cases := []struct {
|
||||
raw string
|
||||
@@ -172,7 +172,7 @@ func TestParseJSONRPC(t *testing.T) {
|
||||
|
||||
func TestParseURI(t *testing.T) {
|
||||
demo := func(ctx context.Context, height int, name string) {}
|
||||
call := NewRPCFunc(demo, "height,name")
|
||||
call := NewRPCFunc(demo, "height", "name")
|
||||
|
||||
cases := []struct {
|
||||
raw []string
|
||||
|
||||
Reference in New Issue
Block a user