mirror of https://github.com/vacp2p/nim-libp2p.git
remove unneeded changes
This commit is contained in:
parent
9d3cc9647b
commit
6112de746d
|
@ -52,8 +52,7 @@ suite "GossipSub":
|
||||||
proc runTests(): Future[bool] {.async.} =
|
proc runTests(): Future[bool] {.async.} =
|
||||||
var handlerFut = newFuture[bool]()
|
var handlerFut = newFuture[bool]()
|
||||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||||
check:
|
check topic == "foobar"
|
||||||
topic == "foobar"
|
|
||||||
handlerFut.complete(true)
|
handlerFut.complete(true)
|
||||||
|
|
||||||
var nodes = generateNodes(2, true)
|
var nodes = generateNodes(2, true)
|
||||||
|
@ -72,8 +71,7 @@ suite "GossipSub":
|
||||||
proc validator(topic: string,
|
proc validator(topic: string,
|
||||||
message: Message):
|
message: Message):
|
||||||
Future[bool] {.async.} =
|
Future[bool] {.async.} =
|
||||||
check:
|
check topic == "foobar"
|
||||||
topic == "foobar"
|
|
||||||
validatorFut.complete(true)
|
validatorFut.complete(true)
|
||||||
result = true
|
result = true
|
||||||
|
|
||||||
|
@ -90,8 +88,7 @@ suite "GossipSub":
|
||||||
test "GossipSub validation should fail":
|
test "GossipSub validation should fail":
|
||||||
proc runTests(): Future[bool] {.async.} =
|
proc runTests(): Future[bool] {.async.} =
|
||||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||||
check:
|
check false # if we get here, it should fail
|
||||||
false # if we get here, it should fail
|
|
||||||
|
|
||||||
var nodes = generateNodes(2, true)
|
var nodes = generateNodes(2, true)
|
||||||
var awaiters: seq[Future[void]]
|
var awaiters: seq[Future[void]]
|
||||||
|
@ -125,8 +122,7 @@ suite "GossipSub":
|
||||||
proc runTests(): Future[bool] {.async.} =
|
proc runTests(): Future[bool] {.async.} =
|
||||||
var handlerFut = newFuture[bool]()
|
var handlerFut = newFuture[bool]()
|
||||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||||
check:
|
check topic == "foo"
|
||||||
topic == "foo"
|
|
||||||
handlerFut.complete(true)
|
handlerFut.complete(true)
|
||||||
|
|
||||||
var nodes = generateNodes(2, true)
|
var nodes = generateNodes(2, true)
|
||||||
|
@ -247,8 +243,7 @@ suite "GossipSub":
|
||||||
proc runTests(): Future[bool] {.async.} =
|
proc runTests(): Future[bool] {.async.} =
|
||||||
var passed = newFuture[void]()
|
var passed = newFuture[void]()
|
||||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||||
check:
|
check topic == "foobar"
|
||||||
topic == "foobar"
|
|
||||||
passed.complete()
|
passed.complete()
|
||||||
|
|
||||||
var nodes = generateNodes(2, true)
|
var nodes = generateNodes(2, true)
|
||||||
|
@ -296,8 +291,7 @@ suite "GossipSub":
|
||||||
proc runTests(): Future[bool] {.async.} =
|
proc runTests(): Future[bool] {.async.} =
|
||||||
var passed: Future[bool] = newFuture[bool]()
|
var passed: Future[bool] = newFuture[bool]()
|
||||||
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
proc handler(topic: string, data: seq[byte]) {.async, gcsafe.} =
|
||||||
check:
|
check topic == "foobar"
|
||||||
topic == "foobar"
|
|
||||||
passed.complete(true)
|
passed.complete(true)
|
||||||
|
|
||||||
var nodes = generateNodes(2, true)
|
var nodes = generateNodes(2, true)
|
||||||
|
|
Loading…
Reference in New Issue