Commit Graph

10 Commits

Author SHA1 Message Date
Vasil Dimov
bb719a08db
style: remove () from assert in rpc_setban.py 2021-06-21 15:29:28 +02:00
Vasil Dimov
dd4e957dcd
test: ensure banlist can be read from disk after restart
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-06-21 15:27:03 +02:00
Vasil Dimov
39b43298d9
test: add test for banning of non-IP addresses
Co-authored-by: Jon Atack <jon@atack.com>
2021-01-10 15:51:25 +01:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
Prayank
4b16c61461 scripted-diff: test: Replace uses of (dis)?connect_nodes global
-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-10-20 00:42:00 -07:00
Micky Yun Chan
2d23082cbe bump test timeouts so that functional tests run in valgrind 2020-01-25 15:51:35 +08:00
MarcoFalke
fae91a09c4
test: Remove incorrect and unused try-block in assert_debug_log 2019-09-04 13:10:37 -04:00
Jonas Schnelli
6011c9d72d
QA: fix rpc_setban.py race 2019-08-21 14:18:40 +02:00
nicolas.dorier
3b05f0f70f
Reformat p2p_permissions.py 2019-08-17 00:43:37 +09:00
nicolas.dorier
d117f4541d
Add test for setban 2019-08-16 13:40:31 +09:00