mirror of
https://github.com/status-im/nim-eth-p2p.git
synced 2025-02-10 13:57:20 +00:00
Compatibility with newer nim
This commit is contained in:
parent
4b5cda9233
commit
2c3a183445
@ -321,7 +321,6 @@ proc registerMsg(protocol: var ProtocolInfo,
|
|||||||
proc registerProtocol(protocol: ProtocolInfo) =
|
proc registerProtocol(protocol: ProtocolInfo) =
|
||||||
# TODO: This can be done at compile-time in the future
|
# TODO: This can be done at compile-time in the future
|
||||||
if protocol.version > 0:
|
if protocol.version > 0:
|
||||||
if gProtocols.isNil: gProtocols = @[]
|
|
||||||
let pos = lowerBound(gProtocols, protocol)
|
let pos = lowerBound(gProtocols, protocol)
|
||||||
gProtocols.insert(protocol, pos)
|
gProtocols.insert(protocol, pos)
|
||||||
for i in 0 ..< gProtocols.len:
|
for i in 0 ..< gProtocols.len:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user