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 44
44
TXREQUEST_TIME_SKIP = NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY + OVERLOADED_PEER_TX_DELAY + 1
45
45
46
46
def 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
-
52
47
def wrapper (self ):
53
48
try :
54
49
func (self )
55
50
finally :
56
51
# Clear mempool
57
52
self .generate (self .nodes [0 ], 1 )
58
53
self .nodes [0 ].disconnect_p2ps ()
59
- self .nodes [0 ].bumpmocktime (LONG_TIME_SKIP )
60
54
# Check that mempool and orphanage have been cleared
61
55
self .wait_until (lambda : len (self .nodes [0 ].getorphantxs ()) == 0 )
62
56
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 ()))
63
61
self .wallet .rescan_utxos (include_mempool = True )
64
62
return wrapper
65
63
You can’t perform that action at this time.
0 commit comments