diff --git a/eth_p2p.nimble b/eth_p2p.nimble index fe52fd0..4bbbb6d 100644 --- a/eth_p2p.nimble +++ b/eth_p2p.nimble @@ -15,6 +15,7 @@ requires "nim > 0.18.0", "ranges", "stint", "byteutils", + "chronicles", "https://github.com/status-im/nim-asyncdispatch2" proc runTest(name: string, lang = "c") = exec "nim " & lang & " -r tests/" & name diff --git a/eth_p2p/rlpx.nim b/eth_p2p/rlpx.nim index 56afd66..9fb81c7 100644 --- a/eth_p2p/rlpx.nim +++ b/eth_p2p/rlpx.nim @@ -391,7 +391,7 @@ proc resolveResponseFuture(peer: Peer, msgId: int, msg: pointer, reqId: int) = for req in outstandingReqs: if not req.future.finished: break inc expiredRequests - outstandingReqs.shrink(fromFront = expiredRequests) + outstandingReqs.shrink(fromFirst = expiredRequests) if outstandingReqs.len > 0: let oldestReq = outstandingReqs.popFirst assert oldestReq.reqId == -1 @@ -422,7 +422,7 @@ proc resolveResponseFuture(peer: Peer, msgId: int, msg: pointer, reqId: int) = if idx != outstandingReqs.len - 1: req = outstandingReqs.popLast else: - outstandingReqs.shrink(fromEnd = 1) + outstandingReqs.shrink(fromLast = 1) # This was the last item, so we don't have any # more work to do: return @@ -434,7 +434,7 @@ proc resolveResponseFuture(peer: Peer, msgId: int, msg: pointer, reqId: int) = if idx != outstandingReqs.len - 1: req = outstandingReqs.popLast else: - outstandingReqs.shrink(fromEnd = 1) + outstandingReqs.shrink(fromLast = 1) return inc idx