From b88bfc05f851f90fe8e8d0872f7dcad2e94d0877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Thor=C3=A9n?= Date: Fri, 29 May 2020 23:35:03 +0800 Subject: [PATCH] Make GossipSub initPubSub method public (#193) This means we can use it from other protocols that inherit GossipSub. Otherwise, a lot of internal state (heartbeat lock etc) doesn't get initialized properly. --- libp2p/protocols/pubsub/gossipsub.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index b154139..c2584af 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -452,7 +452,7 @@ method stop*(g: GossipSub) {.async.} = g.heartbeatLock.release() -method initPubSub(g: GossipSub) = +method initPubSub*(g: GossipSub) = procCall FloodSub(g).initPubSub() randomize()