@@ -48,29 +48,16 @@ def run_test(self):
48
48
# NODE_BLOOM & NODE_WITNESS & NODE_NETWORK_LIMITED must now be signaled
49
49
assert_equal (self .get_signalled_service_flags (), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED )
50
50
51
+ # Test the RPC service flags
52
+ assert_equal (int (self .nodes [0 ].getnetworkinfo ()['localservices' ], 16 ), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED )
53
+
51
54
# Now mine some blocks over the NODE_NETWORK_LIMITED + 2(racy buffer ext.) target
52
- firstblock = self .nodes [0 ].generate (1 )[0 ]
53
55
blocks = self .nodes [0 ].generate (292 )
54
- block_within_limited_range = blocks [- 1 ]
55
56
56
57
# Make sure we can max retrive block at tip-288
57
58
# requesting block at height 2 (tip-289) must fail (ignored)
58
- self .try_get_block_via_getdata (firstblock , True ) # first block must lead to disconnect
59
59
self .try_get_block_via_getdata (blocks [1 ], False ) # last block in valid range
60
60
self .try_get_block_via_getdata (blocks [0 ], True ) # first block outside of the 288+2 limit
61
61
62
- # NODE_NETWORK_LIMITED must still be signaled after restart
63
- self .restart_node (0 )
64
- assert_equal (self .get_signalled_service_flags (), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED )
65
-
66
- # Test the RPC service flags
67
- assert_equal (int (self .nodes [0 ].getnetworkinfo ()['localservices' ], 16 ), NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED )
68
-
69
- # getdata a block above the NODE_NETWORK_LIMITED threshold must be possible
70
- self .try_get_block_via_getdata (block_within_limited_range , False )
71
-
72
- # getdata a block below the NODE_NETWORK_LIMITED threshold must be ignored
73
- self .try_get_block_via_getdata (firstblock , True )
74
-
75
62
if __name__ == '__main__' :
76
63
NodeNetworkLimitedTest ().main ()
0 commit comments