Fix disconnect_ban.py
We run tests in mocked time, need to bump it here for "remove from ban list after 1 sec" logic to triger.
This commit is contained in:
parent
e6a0b2162b
commit
788973a8a6
@ -11,6 +11,9 @@ from test_framework.util import (assert_equal,
|
||||
connect_nodes_bi,
|
||||
start_node,
|
||||
stop_node,
|
||||
set_mocktime,
|
||||
get_mocktime,
|
||||
set_node_times,
|
||||
)
|
||||
|
||||
class DisconnectBanTest(BitcoinTestFramework):
|
||||
@ -64,6 +67,8 @@ class DisconnectBanTest(BitcoinTestFramework):
|
||||
self.nodes[1].setban("2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/19", "add", 1000) # ban for 1000 seconds
|
||||
listBeforeShutdown = self.nodes[1].listbanned()
|
||||
assert_equal("192.168.0.1/32", listBeforeShutdown[2]['address'])
|
||||
set_mocktime(get_mocktime() + 2)
|
||||
set_node_times(self.nodes, get_mocktime())
|
||||
wait_until(lambda: len(self.nodes[1].listbanned()) == 3)
|
||||
|
||||
stop_node(self.nodes[1], 1)
|
||||
|
Loading…
Reference in New Issue
Block a user