test lookup with traditional findNode as well
This commit is contained in:
parent
01488104e5
commit
667a8b91a4
|
@ -272,7 +272,7 @@ suite "Discovery v5 Tests":
|
||||||
await mainNode.closeWait()
|
await mainNode.closeWait()
|
||||||
await testNode.closeWait()
|
await testNode.closeWait()
|
||||||
|
|
||||||
test "Lookup targets":
|
proc testLookupTargets(fast: bool = false) {.async.} =
|
||||||
const
|
const
|
||||||
nodeCount = 17
|
nodeCount = 17
|
||||||
|
|
||||||
|
@ -301,13 +301,19 @@ suite "Discovery v5 Tests":
|
||||||
|
|
||||||
for i in 0..<nodeCount-1:
|
for i in 0..<nodeCount-1:
|
||||||
let target = nodes[i]
|
let target = nodes[i]
|
||||||
let discovered = await nodes[nodeCount-1].lookup(target.localNode.id)
|
let discovered = await nodes[nodeCount-1].lookup(target.localNode.id, fast = fast)
|
||||||
debug "Lookup result", target = target.localNode, discovered
|
debug "Lookup result", target = target.localNode, discovered
|
||||||
check discovered[0] == target.localNode
|
check discovered[0] == target.localNode
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
await node.closeWait()
|
await node.closeWait()
|
||||||
|
|
||||||
|
test "Lookup targets":
|
||||||
|
await testLookupTargets()
|
||||||
|
|
||||||
|
test "Lookup targets using traditional findNode":
|
||||||
|
await testLookupTargets(fast = true)
|
||||||
|
|
||||||
test "Resolve target":
|
test "Resolve target":
|
||||||
let
|
let
|
||||||
mainNode =
|
mainNode =
|
||||||
|
|
Loading…
Reference in New Issue