mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
test: remove duplicated ban test
Test the ban list is preserved through restart has been done by both `rpc_setban` and `p2p_disconnect_ban`. Since `p2p_disconnect_ban` does it in a more elegant way, we can keep only it and remove the duplicated one.
This commit is contained in:
@@ -64,20 +64,10 @@ class SetBanTests(BitcoinTestFramework):
|
||||
assert self.is_banned(node, tor_addr)
|
||||
assert not self.is_banned(node, ip_addr)
|
||||
|
||||
self.log.info("Test the ban list is preserved through restart")
|
||||
|
||||
self.restart_node(1)
|
||||
assert self.is_banned(node, tor_addr)
|
||||
assert not self.is_banned(node, ip_addr)
|
||||
|
||||
node.setban(tor_addr, "remove")
|
||||
assert not self.is_banned(self.nodes[1], tor_addr)
|
||||
assert not self.is_banned(node, ip_addr)
|
||||
|
||||
self.restart_node(1)
|
||||
assert not self.is_banned(node, tor_addr)
|
||||
assert not self.is_banned(node, ip_addr)
|
||||
|
||||
self.log.info("Test -bantime")
|
||||
self.restart_node(1, ["-bantime=1234"])
|
||||
self.nodes[1].setban("127.0.0.1", "add")
|
||||
|
Reference in New Issue
Block a user