diff --git a/eth/p2p/rlpx_protocols/eth_protocol.nim b/eth/p2p/rlpx_protocols/eth_protocol.nim index b1268bb..0ba5a29 100644 --- a/eth/p2p/rlpx_protocols/eth_protocol.nim +++ b/eth/p2p/rlpx_protocols/eth_protocol.nim @@ -46,12 +46,12 @@ p2pProtocol eth(version = protocolVersion, chain = network.chain bestBlock = chain.getBestBlockHeader - let m = await peer.handhake(timeout = 10.seconds, - status(protocolVersion, - network.networkId, - bestBlock.difficulty, - bestBlock.blockHash, - chain.genesisHash)) + let m = await peer.handshake(timeout = chronos.seconds(10), + status(protocolVersion, + network.networkId, + bestBlock.difficulty, + bestBlock.blockHash, + chain.genesisHash)) if m.networkId == network.networkId and m.genesisHash == chain.genesisHash: trace "suitable peer", peer diff --git a/eth/p2p/rlpx_protocols/les_protocol.nim b/eth/p2p/rlpx_protocols/les_protocol.nim index e4bfe69..dfe9daf 100644 --- a/eth/p2p/rlpx_protocols/les_protocol.nim +++ b/eth/p2p/rlpx_protocols/les_protocol.nim @@ -208,7 +208,7 @@ p2pProtocol les(version = lesVersion, lesProperties.add(keyAnnounceType => lesNetwork.ourAnnounceType) let - s = await peer.handshake(timeout = 10.seconds, status(lesProperties)) + s = await peer.handshake(timeout = chronos.seconds(10), status(lesProperties)) peerNetworkId = s.values.getRequiredValue(keyNetworkId, uint) peerGenesisHash = s.values.getRequiredValue(keyGenesisHash, KeccakHash) peerLesVersion = s.values.getRequiredValue(keyProtocolVersion, uint)