We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-bantime
1 parent 8c4958b commit 9c18992Copy full SHA for 9c18992
test/functional/rpc_setban.py
@@ -6,7 +6,8 @@
6
7
from test_framework.test_framework import BitcoinTestFramework
8
from test_framework.util import (
9
- p2p_port
+ p2p_port,
10
+ assert_equal,
11
)
12
13
class SetBanTests(BitcoinTestFramework):
@@ -70,6 +71,11 @@ def run_test(self):
70
71
assert not self.is_banned(node, tor_addr)
72
assert not self.is_banned(node, ip_addr)
73
74
+ self.log.info("Test -bantime")
75
+ self.restart_node(1, ["-bantime=1234"])
76
+ self.nodes[1].setban("127.0.0.1", "add")
77
+ banned = self.nodes[1].listbanned()[0]
78
+ assert_equal(banned['ban_duration'], 1234)
79
80
if __name__ == '__main__':
81
SetBanTests().main()
0 commit comments