fix breakage with Nim HEAD

This commit is contained in:
Ștefan Talpalaru 2019-01-03 22:22:24 +01:00 committed by zah
parent b21e381dfa
commit 7c185b1731
2 changed files with 1 additions and 3 deletions

View File

@ -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:

View File

@ -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