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