mirror of https://github.com/vacp2p/nim-libp2p.git
fix memory safety issue in tests (#484)
This commit is contained in:
parent
42d264d8b0
commit
4224f12503
|
@ -513,7 +513,8 @@ suite "GossipSub":
|
||||||
|
|
||||||
var seen: Table[string, int]
|
var seen: Table[string, int]
|
||||||
var seenFut = newFuture[void]()
|
var seenFut = newFuture[void]()
|
||||||
for dialer in nodes:
|
for i in 0..<nodes.len:
|
||||||
|
let dialer = nodes[i]
|
||||||
var handler: TopicHandler
|
var handler: TopicHandler
|
||||||
closureScope:
|
closureScope:
|
||||||
var peerName = $dialer.peerInfo.peerId
|
var peerName = $dialer.peerInfo.peerId
|
||||||
|
@ -564,7 +565,8 @@ suite "GossipSub":
|
||||||
|
|
||||||
var seen: Table[string, int]
|
var seen: Table[string, int]
|
||||||
var seenFut = newFuture[void]()
|
var seenFut = newFuture[void]()
|
||||||
for dialer in nodes:
|
for i in 0..<nodes.len:
|
||||||
|
let dialer = nodes[i]
|
||||||
var handler: TopicHandler
|
var handler: TopicHandler
|
||||||
closureScope:
|
closureScope:
|
||||||
var peerName = $dialer.peerInfo.peerId
|
var peerName = $dialer.peerInfo.peerId
|
||||||
|
|
Loading…
Reference in New Issue