Bump vendor/nim-eth and fix changes

This commit is contained in:
kdeme 2020-01-14 23:12:53 +01:00 committed by zah
parent 6e4b73b562
commit 8c3595ff94
4 changed files with 8 additions and 6 deletions

View File

@ -275,7 +275,7 @@ proc setupWakuRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer) =
if options.allowP2P.isSome():
allowP2P = options.allowP2P.get()
let filter = newFilter(src, privateKey, symKey, topics, powReq, allowP2P)
let filter = initFilter(src, privateKey, symKey, topics, powReq, allowP2P)
result = node.subscribeFilter(filter).Identifier
# TODO: Should we do this here "automatically" or separate it in another
@ -287,7 +287,9 @@ proc setupWakuRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer) =
if config.wakuMode == WakuChan:
try:
# TODO: an addTopics call would probably be more useful
waitFor node.setTopics(config.topics.concat(filter.topics))
let result = waitFor node.setTopics(config.topics.concat(filter.topics))
if not result:
raise newException(ValueError, "Too many topics")
except CatchableError:
trace "setTopics error occured"
elif config.isLightNode:

View File

@ -276,7 +276,7 @@ proc setupWhisperRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer)
if options.allowP2P.isSome():
allowP2P = options.allowP2P.get()
let filter = newFilter(src, privateKey, symKey, topics, powReq, allowP2P)
let filter = initFilter(src, privateKey, symKey, topics, powReq, allowP2P)
result = node.subscribeFilter(filter).Identifier
rpcsrv.rpc("shh_deleteMessageFilter") do(id: Identifier) -> bool:

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit ac30d7f589963ad33404acbafdd39016a1262a34
Subproject commit b7ebf8ed54c14884a63f185de1f38a25bc8fbcbc

View File

@ -366,7 +366,7 @@ proc nimbus_subscribe_filter(options: ptr CFilterOptions,
except KeyError:
return false
let filter = newFilter(src, privateKey, symKey, @[options.topic],
let filter = initFilter(src, privateKey, symKey, @[options.topic],
options.minPow, options.allowP2P)
proc c_handler(msg: ReceivedMessage) {.gcsafe.} =
@ -437,7 +437,7 @@ proc subscribeChannel(
info "Subscribing to channel", channel, topic, symKey
discard node.subscribeFilter(newFilter(symKey = some(symKey),
discard node.subscribeFilter(initFilter(symKey = some(symKey),
topics = @[topic]),
handler)