File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 4444TXREQUEST_TIME_SKIP = NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY + OVERLOADED_PEER_TX_DELAY + 1
4545
4646def cleanup (func ):
47- # Time to fastfoward (using setmocktime) in between subtests to ensure they do not interfere with
48- # one another, in seconds. Equal to 12 hours, which is enough to expire anything that may exist
49- # (though nothing should since state should be cleared) in p2p data structures.
50- LONG_TIME_SKIP = 12 * 60 * 60
51-
5247 def wrapper (self ):
5348 try :
5449 func (self )
5550 finally :
5651 # Clear mempool
5752 self .generate (self .nodes [0 ], 1 )
5853 self .nodes [0 ].disconnect_p2ps ()
59- self .nodes [0 ].bumpmocktime (LONG_TIME_SKIP )
6054 # Check that mempool and orphanage have been cleared
6155 self .wait_until (lambda : len (self .nodes [0 ].getorphantxs ()) == 0 )
6256 assert_equal (0 , len (self .nodes [0 ].getrawmempool ()))
57+
58+ self .restart_node (0 , extra_args = ["-persistmempool=0" ])
59+ # Allow use of bumpmocktime again
60+ self .nodes [0 ].setmocktime (int (time .time ()))
6361 self .wallet .rescan_utxos (include_mempool = True )
6462 return wrapper
6563
You can’t perform that action at this time.
0 commit comments