From cc52ef35e4893d6dddd4b1d776e6b8a56f2d945c Mon Sep 17 00:00:00 2001 From: jangko Date: Sat, 15 Oct 2022 08:49:11 +0700 Subject: [PATCH] add more tests to verify network state replacement --- tests/p2p/test_protocol_handlers.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/p2p/test_protocol_handlers.nim b/tests/p2p/test_protocol_handlers.nim index fd35a8d..eeda088 100644 --- a/tests/p2p/test_protocol_handlers.nim +++ b/tests/p2p/test_protocol_handlers.nim @@ -90,5 +90,7 @@ suite "Testing protocol handlers": test "Override network state": let rng = newRng() var node = setupTestNode(rng, hah) - node.addCapability(hah, network()) - node.replaceNetworkState(hah, network()) + node.addCapability(hah, network(count: 3)) + check node.protocolState(hah).count == 3 + node.replaceNetworkState(hah, network(count: 7)) + check node.protocolState(hah).count == 7