From 7c185b17312c4dd9049501a11b95b845628b7e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 3 Jan 2019 22:22:24 +0100 Subject: [PATCH] fix breakage with Nim HEAD --- eth_p2p/discovery.nim | 2 -- eth_p2p/rlpx_protocols/les_protocol.nim | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/eth_p2p/discovery.nim b/eth_p2p/discovery.nim index 81f453b..9eda764 100644 --- a/eth_p2p/discovery.nim +++ b/eth_p2p/discovery.nim @@ -235,8 +235,6 @@ proc receive(d: DiscoveryProtocol, a: Address, msg: Bytes) = d.recvNeighbours(node, payload) of cmdFindNode: d.recvFindNode(node, payload) - else: - debug "Unknown command", cmdId else: trace "Received msg already expired", cmdId, a else: diff --git a/eth_p2p/rlpx_protocols/les_protocol.nim b/eth_p2p/rlpx_protocols/les_protocol.nim index dba0451..7b593a4 100644 --- a/eth_p2p/rlpx_protocols/les_protocol.nim +++ b/eth_p2p/rlpx_protocols/les_protocol.nim @@ -86,7 +86,7 @@ proc removePeer(network: LesNetwork, peer: LesPeer) = network.delistFromFlowControl peer network.peers.excl peer -template costQuantity(quantityExpr: int, max: int) {.pragma.} +template costQuantity(quantityExpr, max: untyped) {.pragma.} proc getCostQuantity(fn: NimNode): tuple[quantityExpr, maxQuantity: NimNode] = # XXX: `getCustomPragmaVal` doesn't work yet on regular nnkProcDef nodes