aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-06-04 21:50:09 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-06-04 21:49:50 +0200
commit4444de152f01368e603f2b089679a86eae02e34a (patch)
tree548b97a379ab7efa252c54e40f7dfa6df932e49d /test/functional
parentfa6aa4027cecd819c1210d6959af364d5bf9f608 (diff)
test: Set mocktime in p2p_disconnect_ban.py to avoid intermittent test failure
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/p2p_disconnect_ban.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/p2p_disconnect_ban.py b/test/functional/p2p_disconnect_ban.py
index 72a42a658e..e47f9c732b 100755
--- a/test/functional/p2p_disconnect_ban.py
+++ b/test/functional/p2p_disconnect_ban.py
@@ -102,7 +102,9 @@ class DisconnectBanTest(BitcoinTestFramework):
assert_equal(ban["ban_duration"], 120)
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()
assert_equal("127.0.0.0/24", listAfterShutdown[0]['address'])