File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,11 @@ def run_test(self):
141
141
assert no_verack_idlenode .unexpected_msg == False
142
142
143
143
self .log .info ('Check that the version message does not leak the local address of the node' )
144
- time_begin = int (time .time ())
145
144
p2p_version_store = self .nodes [0 ].add_p2p_connection (P2PVersionStore ())
146
- time_end = time .time ()
147
145
ver = p2p_version_store .version_received
148
- assert_greater_than_or_equal (ver .nTime , time_begin )
149
- assert_greater_than_or_equal (time_end , ver .nTime )
146
+ # Check that received time is within one hour of now
147
+ assert_greater_than_or_equal (ver .nTime , time .time () - 3600 )
148
+ assert_greater_than_or_equal (time .time () + 3600 , ver .nTime )
150
149
assert_equal (ver .addrFrom .port , 0 )
151
150
assert_equal (ver .addrFrom .ip , '0.0.0.0' )
152
151
assert_equal (ver .nStartingHeight , 201 )
Original file line number Diff line number Diff line change @@ -1896,12 +1896,12 @@ def test_non_standard_witness(self):
1896
1896
def test_upgrade_after_activation (self ):
1897
1897
"""Test the behavior of starting up a segwit-aware node after the softfork has activated."""
1898
1898
1899
- # Restart with the new binary
1900
1899
self .stop_node (2 )
1901
1900
self .start_node (2 , extra_args = ["-segwitheight={}" .format (SEGWIT_HEIGHT )])
1902
1901
connect_nodes (self .nodes [0 ], 2 )
1903
1902
1904
- self .sync_blocks ()
1903
+ # We reconnect more than 100 blocks, give it plenty of time
1904
+ self .sync_blocks (timeout = 240 )
1905
1905
1906
1906
# Make sure that this peer thinks segwit has activated.
1907
1907
assert softfork_active (self .nodes [2 ], 'segwit' )
You can’t perform that action at this time.
0 commit comments