From 0e5cd27e8426afb41dcd0cda852fddc5dc8c03ff Mon Sep 17 00:00:00 2001 From: cheatfate Date: Mon, 30 Apr 2018 21:38:43 +0300 Subject: [PATCH] Fix [ProveInit] compilation warning. --- ethp2p/discovery.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ethp2p/discovery.nim b/ethp2p/discovery.nim index 8b187a3..093b8a0 100644 --- a/ethp2p/discovery.nim +++ b/ethp2p/discovery.nim @@ -97,8 +97,7 @@ proc recoverMsgPublicKey(msg: Bytes, pk: var PublicKey): bool = pk) == EthKeysStatus.Success proc unpack(msg: Bytes): tuple[cmdId: CommandId, payload: Bytes] = - result.cmdId = msg[HEAD_SIZE].CommandId - result.payload = msg[HEAD_SIZE + 1 .. ^1] + result = (cmdId: msg[HEAD_SIZE].CommandId, payload: msg[HEAD_SIZE + 1 .. ^1]) proc expiration(): uint32 = result = uint32(epochTime() + EXPIRATION)