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:
Roman Khimov 2020-04-28 16:56:33 +03:00
parent de91418d45
commit 57de98e1a3
2 changed files with 9 additions and 9 deletions

View file

@ -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
}