mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-10 21:16:30 +00:00
fixing review comments
This commit is contained in:
parent
96459cc47c
commit
1d5baca63c
@ -665,7 +665,6 @@ suite "GossipSub internal":
|
|||||||
# test cases for block 5 gossibsub test plan
|
# test cases for block 5 gossibsub test plan
|
||||||
# check correctly parsed ihave/iwant/graft/prune/idontwant messages
|
# check correctly parsed ihave/iwant/graft/prune/idontwant messages
|
||||||
# check value before & after decoding equal using protoc cmd tool for reference
|
# check value before & after decoding equal using protoc cmd tool for reference
|
||||||
# check encoding / decoding time less than 1 millisecond
|
|
||||||
asyncTest "Check RPCMsg encoding":
|
asyncTest "Check RPCMsg encoding":
|
||||||
let backofftime = 10.uint64
|
let backofftime = 10.uint64
|
||||||
var id: seq[byte] = @[123]
|
var id: seq[byte] = @[123]
|
||||||
@ -687,11 +686,9 @@ suite "GossipSub internal":
|
|||||||
111, 98, 97, 114, 16, 10, 42, 5, 10, 3, 49, 50, 51,
|
111, 98, 97, 114, 16, 10, 42, 5, 10, 3, 49, 50, 51,
|
||||||
] #encoded using protoc cmd tool
|
] #encoded using protoc cmd tool
|
||||||
|
|
||||||
let encodeTimeout = Moment.now() + 1.milliseconds
|
|
||||||
let encodedMsg = encodeRpcMsg(rpcMsg, true)
|
|
||||||
let timeout2 = Moment.now()
|
|
||||||
check:
|
check:
|
||||||
encodeTimeout > timeout2
|
|
||||||
encodedExpected == encodedMsg
|
encodedExpected == encodedMsg
|
||||||
|
|
||||||
asyncTest "Check RPCMsg decoding":
|
asyncTest "Check RPCMsg decoding":
|
||||||
@ -716,11 +713,9 @@ suite "GossipSub internal":
|
|||||||
3, 10, 1, 49,
|
3, 10, 1, 49,
|
||||||
]
|
]
|
||||||
|
|
||||||
let decodeTimeout = Moment.now() + 1.milliseconds
|
|
||||||
var rpcMsg = decodeRpcMsg(encodedMsg).value
|
|
||||||
let timeout2 = Moment.now()
|
|
||||||
check:
|
check:
|
||||||
decodeTimeout > timeout2
|
|
||||||
rpcMsg == originMessage
|
rpcMsg == originMessage
|
||||||
|
|
||||||
asyncTest "handleIHave/Iwant tests":
|
asyncTest "handleIHave/Iwant tests":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user