mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-28 23:55:43 +00:00
Fix nil error when starting wakunode2 with store/filter node (#441)
This commit is contained in:
parent
d1c1a0ca13
commit
aa9a74c60b
@ -581,7 +581,8 @@ when isMainModule:
|
|||||||
|
|
||||||
# TODO Set swap peer, for now should be same as store peer
|
# TODO Set swap peer, for now should be same as store peer
|
||||||
|
|
||||||
if conf.store:
|
# Store setup
|
||||||
|
if (conf.storenode != "") or (conf.store):
|
||||||
var store: WakuMessageStore
|
var store: WakuMessageStore
|
||||||
|
|
||||||
if not sqliteDatabase.isNil:
|
if not sqliteDatabase.isNil:
|
||||||
@ -594,20 +595,22 @@ when isMainModule:
|
|||||||
|
|
||||||
mountStore(node, store)
|
mountStore(node, store)
|
||||||
|
|
||||||
if conf.filter:
|
if conf.storenode != "":
|
||||||
|
setStorePeer(node, conf.storenode)
|
||||||
|
|
||||||
|
# Filter setup
|
||||||
|
if (conf.filternode != "") or (conf.filter):
|
||||||
mountFilter(node)
|
mountFilter(node)
|
||||||
|
|
||||||
if conf.relay:
|
if conf.filternode != "":
|
||||||
|
setFilterPeer(node, conf.filternode)
|
||||||
|
|
||||||
|
# Relay setup
|
||||||
|
if conf.relay: # True by default
|
||||||
mountRelay(node, conf.topics.split(" "), rlnRelayEnabled = conf.rlnrelay)
|
mountRelay(node, conf.topics.split(" "), rlnRelayEnabled = conf.rlnrelay)
|
||||||
|
|
||||||
if conf.staticnodes.len > 0:
|
if conf.staticnodes.len > 0:
|
||||||
waitFor connectToNodes(node, conf.staticnodes)
|
waitFor connectToNodes(node, conf.staticnodes)
|
||||||
|
|
||||||
if conf.storenode != "":
|
|
||||||
setStorePeer(node, conf.storenode)
|
|
||||||
|
|
||||||
if conf.filternode != "":
|
|
||||||
setFilterPeer(node, conf.filternode)
|
|
||||||
|
|
||||||
if conf.rpc:
|
if conf.rpc:
|
||||||
startRpc(node, conf.rpcAddress, Port(conf.rpcPort + conf.portsShift), conf)
|
startRpc(node, conf.rpcAddress, Port(conf.rpcPort + conf.portsShift), conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user