rpc/server: refactor handler methods a little
request.In is a natural request representation, one can always get request.Params from it.
This commit is contained in:
parent
de91418d45
commit
57de98e1a3
2 changed files with 9 additions and 9 deletions
|
@ -55,7 +55,7 @@ func initServerWithInMemoryChain(t *testing.T) (*core.Blockchain, http.HandlerFu
|
|||
server, err := network.NewServer(serverConfig, chain, logger)
|
||||
require.NoError(t, err)
|
||||
rpcServer := New(chain, cfg.ApplicationConfiguration.RPC, server, logger)
|
||||
handler := http.HandlerFunc(rpcServer.requestHandler)
|
||||
handler := http.HandlerFunc(rpcServer.handleHTTPRequest)
|
||||
|
||||
return chain, handler
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue