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:
brunoerg
2024-03-20 18:52:26 -03:00
parent 71b63195b3
commit e30e8625bb
2 changed files with 5 additions and 13 deletions

View File

@@ -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")