File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
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 )
You can’t perform that action at this time.
0 commit comments