aboutsummaryrefslogtreecommitdiff
path: root/test/functional/node_network_limited.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-12-11 12:38:50 -0500
committerJohn Newbery <john@johnnewbery.com>2017-12-19 11:20:12 -0500
commitb425131f5ace294f0d8be579f5ef596907cf1e16 (patch)
tree0d086c947ef53976a59d6ed952fd338d1832c17d /test/functional/node_network_limited.py
parent2e029845919eedcb4c4ff5f951cc85d95da68ad1 (diff)
[tests] remove redundant duplicate tests from node_network_limited
Diffstat (limited to 'test/functional/node_network_limited.py')
-rwxr-xr-xtest/functional/node_network_limited.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/test/functional/node_network_limited.py b/test/functional/node_network_limited.py
index 6f1c60eec9..9313e3d35c 100755
--- a/test/functional/node_network_limited.py
+++ b/test/functional/node_network_limited.py
@@ -48,29 +48,16 @@ class NodeNetworkLimitedTest(BitcoinTestFramework):
# NODE_BLOOM & NODE_WITNESS & NODE_NETWORK_LIMITED must now be signaled
assert_equal(self.get_signalled_service_flags(), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED)
+ # Test the RPC service flags
+ assert_equal(int(self.nodes[0].getnetworkinfo()['localservices'], 16), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED)
+
# Now mine some blocks over the NODE_NETWORK_LIMITED + 2(racy buffer ext.) target
- firstblock = self.nodes[0].generate(1)[0]
blocks = self.nodes[0].generate(292)
- block_within_limited_range = blocks[-1]
# Make sure we can max retrive block at tip-288
# requesting block at height 2 (tip-289) must fail (ignored)
- self.try_get_block_via_getdata(firstblock, True) # first block must lead to disconnect
self.try_get_block_via_getdata(blocks[1], False) # last block in valid range
self.try_get_block_via_getdata(blocks[0], True) # first block outside of the 288+2 limit
- # NODE_NETWORK_LIMITED must still be signaled after restart
- self.restart_node(0)
- assert_equal(self.get_signalled_service_flags(), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED)
-
- # Test the RPC service flags
- assert_equal(int(self.nodes[0].getnetworkinfo()['localservices'], 16), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED)
-
- # getdata a block above the NODE_NETWORK_LIMITED threshold must be possible
- self.try_get_block_via_getdata(block_within_limited_range, False)
-
- # getdata a block below the NODE_NETWORK_LIMITED threshold must be ignored
- self.try_get_block_via_getdata(firstblock, True)
-
if __name__ == '__main__':
NodeNetworkLimitedTest().main()