mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
test: Set mocktime in p2p_disconnect_ban.py to avoid intermittent test failure
This commit is contained in:
@@ -102,7 +102,9 @@ class DisconnectBanTest(BitcoinTestFramework):
|
|||||||
assert_equal(ban["ban_duration"], 120)
|
assert_equal(ban["ban_duration"], 120)
|
||||||
assert_equal(ban["time_remaining"], 117)
|
assert_equal(ban["time_remaining"], 117)
|
||||||
|
|
||||||
self.restart_node(1)
|
# Keep mocktime, to avoid ban expiry when restart takes longer than
|
||||||
|
# time_remaining
|
||||||
|
self.restart_node(1, extra_args=[f"-mocktime={old_time+4}"])
|
||||||
|
|
||||||
listAfterShutdown = self.nodes[1].listbanned()
|
listAfterShutdown = self.nodes[1].listbanned()
|
||||||
assert_equal("127.0.0.0/24", listAfterShutdown[0]['address'])
|
assert_equal("127.0.0.0/24", listAfterShutdown[0]['address'])
|
||||||
|
|||||||
Reference in New Issue
Block a user