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.
This commit is contained in:
Oskar Thorén 2020-05-29 23:35:03 +08:00 committed by GitHub
parent 7b6e1c0688
commit b88bfc05f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()