fixes related to nim-json-rpc bump

This commit is contained in:
jangko 2021-11-30 14:13:20 +07:00
parent dcd86bb221
commit f051c2530e
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 3 additions and 3 deletions

View File

@ -234,7 +234,7 @@ proc start(nimbus: NimbusNode, conf: NimbusConf) =
proc stop*(nimbus: NimbusNode, conf: NimbusConf) {.async, gcsafe.} =
trace "Graceful shutdown"
if conf.rpcEnabled:
nimbus.rpcServer.stop()
await nimbus.rpcServer.stop()
if conf.wsEnabled:
nimbus.wsRpcServer.stop()
if conf.graphqlEnabled:

View File

@ -20,8 +20,8 @@ type
proc request*(methodName: string, params: JsonNode): JsonNode =
var client = newRpcHttpClient()
client.httpMethod(MethodPost)
waitFor client.connect("127.0.0.1", Port(8545))
#client.httpMethod(MethodPost)
waitFor client.connect("127.0.0.1", Port(8545), false)
result = waitFor client.call(methodName, params)
waitFor client.close()