Bump nim-eth module and adjust for `distanceTo` API change (#819)

This commit is contained in:
Kim De Mey 2021-09-06 17:04:21 +02:00 committed by GitHub
parent a083fb30fc
commit 832a50df6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -317,7 +317,7 @@ proc lookup*(p: PortalProtocol, target: NodeId): Future[seq[Node]] {.async.} =
# If it wasn't seen before, insert node while remaining sorted
closestNodes.insert(n, closestNodes.lowerBound(n,
proc(x: Node, n: Node): int =
cmp(distanceTo(x, target), distanceTo(n, target))
cmp(distanceTo(x.id, target), distanceTo(n.id, target))
))
if closestNodes.len > BUCKET_SIZE:
@ -417,7 +417,7 @@ proc contentLookup*(p: PortalProtocol, target: ByteList, targetId: UInt256): Fut
# If it wasn't seen before, insert node while remaining sorted
closestNodes.insert(n, closestNodes.lowerBound(n,
proc(x: Node, n: Node): int =
cmp(distanceTo(x, targetId), distanceTo(n, targetId))
cmp(distanceTo(x.id, targetId), distanceTo(n.id, targetId))
))
if closestNodes.len > BUCKET_SIZE:

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit 9bc4fa366af2f75dd2c8608964dc6dc3614b3f81
Subproject commit bfadcfbfaf18916a2ee1b77b896e0d01c6a0ca4f