When memory backend selected, no snap sync (#1738)
This commit is contained in:
parent
b0442dc41a
commit
cf9553196e
|
@ -9,12 +9,19 @@
|
|||
# except according to those terms.
|
||||
|
||||
import
|
||||
../db/select_backend,
|
||||
./handlers/eth as handlers_eth,
|
||||
./handlers/setup as handlers_setup,
|
||||
./handlers/snap as handlers_snap
|
||||
./handlers/setup as handlers_setup
|
||||
|
||||
export
|
||||
handlers_eth, handlers_setup, handlers_snap
|
||||
handlers_eth, handlers_setup
|
||||
|
||||
when dbBackend != select_backend.none:
|
||||
import
|
||||
./handlers/snap as handlers_snap
|
||||
|
||||
export
|
||||
handlers_snap
|
||||
|
||||
static:
|
||||
type
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
import
|
||||
eth/p2p,
|
||||
../../db/select_backend,
|
||||
../../core/[chain, tx_pool],
|
||||
../protocol,
|
||||
./eth as handlers_eth,
|
||||
./snap as handlers_snap
|
||||
./eth as handlers_eth
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Public functions: convenience mappings for `eth`
|
||||
|
@ -47,17 +47,21 @@ proc addEthHandlerCapability*(
|
|||
# Public functions: convenience mappings for `snap`
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc addSnapHandlerCapability*(
|
||||
node: var EthereumNode;
|
||||
peerPool: PeerPool;
|
||||
chain = ChainRef(nil);
|
||||
) =
|
||||
## Install `snap` handlers,Passing `chein` as `nil` installs the handler
|
||||
## in minimal/outbound mode.
|
||||
if chain.isNil:
|
||||
node.addCapability protocol.snap
|
||||
else:
|
||||
node.addCapability(protocol.snap, SnapWireRef.init(chain, peerPool))
|
||||
when dbBackend != select_backend.none:
|
||||
import
|
||||
./snap as handlers_snap
|
||||
|
||||
proc addSnapHandlerCapability*(
|
||||
node: var EthereumNode;
|
||||
peerPool: PeerPool;
|
||||
chain = ChainRef(nil);
|
||||
) =
|
||||
## Install `snap` handlers,Passing `chein` as `nil` installs the handler
|
||||
## in minimal/outbound mode.
|
||||
if chain.isNil:
|
||||
node.addCapability protocol.snap
|
||||
else:
|
||||
node.addCapability(protocol.snap, SnapWireRef.init(chain, peerPool))
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# End
|
||||
|
|
Loading…
Reference in New Issue