diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-06-04 21:50:09 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-06-04 21:49:50 +0200 |
commit | 4444de152f01368e603f2b089679a86eae02e34a (patch) | |
tree | 548b97a379ab7efa252c54e40f7dfa6df932e49d /test/functional | |
parent | fa6aa4027cecd819c1210d6959af364d5bf9f608 (diff) |
test: Set mocktime in p2p_disconnect_ban.py to avoid intermittent test failure
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/p2p_disconnect_ban.py | 4 |
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']) |