Gossipsub unsubscribe fixes (fixes #2540) (#2545)

This commit is contained in:
Jacek Sieka 2021-05-07 06:31:28 +02:00 committed by GitHub
parent 01b404f43d
commit 5cd5da74c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -1633,8 +1633,11 @@ proc shortForm*(id: NetKeyPair): string =
proc subscribe*( proc subscribe*(
node: Eth2Node, topic: string, topicParams: TopicParams, node: Eth2Node, topic: string, topicParams: TopicParams,
enableTopicMetrics: bool = false) {.raises: [Defect, CatchableError].} = enableTopicMetrics: bool = false) {.raises: [Defect, CatchableError].} =
proc dummyMsgHandler(topic: string, data: seq[byte]) {.async.} = proc dummyMsgHandler(topic: string, data: seq[byte]): Future[void] =
discard # Avoid closure environment with `{.async.}`
var res = newFuture[void]("eth2_network.dummyMsgHandler")
res.complete()
res
let let
topicName = topic & "_snappy" topicName = topic & "_snappy"

2
vendor/nim-libp2p vendored

@ -1 +1 @@
Subproject commit 9f301964ed74316de7796c0cbd9728190ac2fdda Subproject commit 83a20a992a56ee1207f575e88d906ee62d911d7f