From 832a50df6eae342f6e9e0c170b04ebefd9749b6c Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Mon, 6 Sep 2021 17:04:21 +0200 Subject: [PATCH] Bump nim-eth module and adjust for `distanceTo` API change (#819) --- fluffy/network/state/portal_protocol.nim | 4 ++-- vendor/nim-eth | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fluffy/network/state/portal_protocol.nim b/fluffy/network/state/portal_protocol.nim index d1a1892eb..c23899591 100644 --- a/fluffy/network/state/portal_protocol.nim +++ b/fluffy/network/state/portal_protocol.nim @@ -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: diff --git a/vendor/nim-eth b/vendor/nim-eth index 9bc4fa366..bfadcfbfa 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 9bc4fa366af2f75dd2c8608964dc6dc3614b3f81 +Subproject commit bfadcfbfaf18916a2ee1b77b896e0d01c6a0ca4f