mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-25 03:28:57 +00:00
Bump nim-eth: Add closeWait to EthereumNode (#1742)
This commit is contained in:
parent
db6bd9af16
commit
948c94763c
@ -91,7 +91,7 @@ proc newEngineEnv*(conf: var NimbusConf, chainFile: string, enableAuth: bool): E
|
||||
echo error
|
||||
quit(QuitFailure)
|
||||
|
||||
var
|
||||
let
|
||||
node = setupEthNode(conf, ctx)
|
||||
com = makeCom(conf)
|
||||
chain = newChain(com)
|
||||
@ -152,13 +152,9 @@ proc newEngineEnv*(conf: var NimbusConf, chainFile: string, enableAuth: bool): E
|
||||
client : client,
|
||||
sync : sync
|
||||
)
|
||||
|
||||
proc close(node: EthereumNode) =
|
||||
node.stopListening()
|
||||
waitFor node.listeningServer.closeWait()
|
||||
|
||||
proc close*(env: EngineEnv) =
|
||||
env.node.close()
|
||||
waitFor env.node.closeWait()
|
||||
env.sync.stop()
|
||||
waitFor env.client.close()
|
||||
waitFor env.sealer.stop()
|
||||
|
@ -22,7 +22,7 @@ import
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc setEthHandlerNewBlocksAndHashes*(
|
||||
node: var EthereumNode;
|
||||
node: EthereumNode;
|
||||
blockHandler: NewBlockHandler;
|
||||
hashesHandler: NewBlockHashesHandler;
|
||||
arg: pointer;
|
||||
@ -32,7 +32,7 @@ proc setEthHandlerNewBlocksAndHashes*(
|
||||
w.setNewBlockHashesHandler(hashesHandler, arg)
|
||||
|
||||
proc addEthHandlerCapability*(
|
||||
node: var EthereumNode;
|
||||
node: EthereumNode;
|
||||
peerPool: PeerPool;
|
||||
chain: ChainRef;
|
||||
txPool = TxPoolRef(nil);
|
||||
@ -48,11 +48,11 @@ proc addEthHandlerCapability*(
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
when dbBackend != select_backend.none:
|
||||
import
|
||||
import
|
||||
./snap as handlers_snap
|
||||
|
||||
|
||||
proc addSnapHandlerCapability*(
|
||||
node: var EthereumNode;
|
||||
node: EthereumNode;
|
||||
peerPool: PeerPool;
|
||||
chain = ChainRef(nil);
|
||||
) =
|
||||
|
2
vendor/nim-eth
vendored
2
vendor/nim-eth
vendored
@ -1 +1 @@
|
||||
Subproject commit 0d7e7448c4a2a50136e726be7d4e4a38e094e8e3
|
||||
Subproject commit ac680ed79bf9e4e78ca14a001eb7f78acdf7b07d
|
Loading…
x
Reference in New Issue
Block a user