aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_setban.py
AgeCommit message (Collapse)Author
2024-07-16scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()`Hennadii Stepanov
-BEGIN VERIFY SCRIPT- sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py) sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py -END VERIFY SCRIPT-
2024-03-26test: remove duplicated ban testbrunoerg
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.
2024-02-02test: fix intermittent failure in rpc_setban.py --v2transportMartin Zumsande
When initiating a v2 connection and being immediately disconnected, a node cannot know if the disconnect happens because the peer only supports v1, or because it has banned you, so it schedules to reconnect with v1. If the test doesn't wait for that, the reconnect can happen at a bad time, resulting in failure in a later connect_nodes call. Also add the test with --v2transport to the test runner.
2023-03-15test: add coverage for `-bantime`brunoerg
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-06-21style: remove () from assert in rpc_setban.pyVasil Dimov
2021-06-21test: ensure banlist can be read from disk after restartVasil Dimov
With `banlist.dat` (being written in addrv1 format) if we would try to write a Tor v3 subnet, it would serialize as a dummy-all-0s IPv6 address and subsequently, when deserialized will not result in the same subnet. This problem does not exist with `banlist.json` where the data is saved in textual, human-readable form.
2021-01-10test: add test for banning of non-IP addressesVasil Dimov
Co-authored-by: Jon Atack <jon@atack.com>
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-10-20scripted-diff: test: Replace uses of (dis)?connect_nodes globalPrayank
-BEGIN VERIFY SCRIPT- # max-depth=0 excludes test/functional/test_framework/... FILES=$(git grep -l --max-depth 0 "connect_nodes" test/functional) # Replace (dis)?connect_nodes(self.nodes[a], b) with self.(dis)?connect_nodes(a, b) sed -i 's/\b\(dis\)\?connect_nodes(self\.nodes\[\(.*\)\]/self.\1connect_nodes(\2/g' $FILES # Remove imports in the middle of a line sed -i 's/\(dis\)\?connect_nodes, //g' $FILES sed -i 's/, \(dis\)\?connect_nodes//g' $FILES # Remove imports on a line by themselves sed -i '/^\s*\(dis\)\?connect_nodes,\?$/d' $FILES sed -i '/^from test_framework\.util import connect_nodes$/d' $FILES -END VERIFY SCRIPT- Co-authored-by: Elliott Jin <elliott.jin@gmail.com>
2020-01-25bump test timeouts so that functional tests run in valgrindMicky Yun Chan
2019-09-04test: Remove incorrect and unused try-block in assert_debug_logMarcoFalke
2019-08-21QA: fix rpc_setban.py raceJonas Schnelli
2019-08-17Reformat p2p_permissions.pynicolas.dorier
2019-08-16Add test for setbannicolas.dorier