diff options
author | fanquake <fanquake@gmail.com> | 2020-03-05 19:58:13 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-03-05 20:13:33 +0800 |
commit | d0601e67f151a753bc71e41e5a5c56a3fa09c1f1 (patch) | |
tree | 6f4b7f03765d9ac41ab10c8dfcfb6bae0153accc /test/functional/test_runner.py | |
parent | cbc32d67dc0cbe636ee3510802ae863bee73ac13 (diff) | |
parent | 1ba3e1cc21150abe632a5b82a1a38998b33815dc (diff) |
Merge #17812: config, net, test: asmap feature refinements and functional tests
1ba3e1cc21150abe632a5b82a1a38998b33815dc init: move asmap code earlier in init process (Jon Atack)
5ba829e12e99f119df56cab422f827b9be03fe57 rpc: fix getpeerinfo RPCResult `mapped_as` type (Jon Atack)
c90b9a2399f4cead37bad39f388ce1255e123dc4 net: extract conditional to bool CNetAddr::IsHeNet (Jon Atack)
819fb5549b0d02477f47b3c40338071f37b6d885 logging: asmap logging and #include fixups (Jon Atack)
dcaf543ba0241f9219cea70b67c7b066d4c9ca9b test: add functional test for an empty, unparsable asmap (Jon Atack)
b8d0412b213df18f23bf8677ab94068c6cca9f51 config: separate the asmap finding and parsing checks (Jon Atack)
81c38a24975f34e5894efe3d1aaf45ff6a8cee4a config: enable passing -asmap an absolute file path (Jon Atack)
fbe9b024f01c29153afe494fed74b623ce3ffefa config: use default value in -asmap config (Jon Atack)
08b992675cf8d946db19b7bea747fa1085fdb2a2 test: add feature_asmap functional tests (Jon Atack)
Pull request description:
This PR builds on PR #16702 to add functional tests / sanity checks and user-facing refinements for passing `-asmap` to configure ASN-based IP bucketing in addrman. As per our review discussion in that PR, the idea here is to handle aspects like functional tests and config arg handling that can help the PR be merged while enabling the author to focus on the bucketing itself.
- [x] add feature functional tests to verify node behaviour and debug log output when launching
- `bitcoind` with no `-asmap` arg
- `bitcoind -asmap=RELATIVE_FILENAME` to the unit test data skeleton asmap
- `bitcoind -asmap` with no filename specified using the default asmap file
- `bitcoind -asmap` with no filename specified and a missing default asmap file
- [x] add the ability to pass absolute path filenames to the `-asmap` config arg in addition to datadir-relative path filenames as per https://github.com/bitcoin/bitcoin/pull/16702#discussion_r361300447, and add test coverage
- [x] separate the asmap file finding and parsing checks, which allows adding tests for the case of a found but unparseable or empty asmap
- [x] add test for an empty asmap
- [x] various asmap fixups
- [x] move the asmap init code earlier in the init process to provide immediate feedback when passing an `-asmap` config arg. This speeds up the `feature_asmap` functional test from 60 to 5 seconds! Credit to Wladimir J. van der Laan for the suggestion.
ACKs for top commit:
practicalswift:
ACK 1ba3e1cc21150abe632a5b82a1a38998b33815dc -- diff looks correct
fanquake:
ACK 1ba3e1cc21150abe632a5b82a1a38998b33815dc
Tree-SHA512: e9094460a597ac5597449acfe631c87b71d3ede6a12c7ae61b26d1161b3eefed8e7e25c4fb0505864cebd89300b7c4cf9378060aa9155441029315df15fa3283
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-x | test/functional/test_runner.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 06d939afb7..2036d20852 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -206,6 +206,7 @@ BASE_SCRIPTS = [ 'p2p_dos_header_tree.py', 'p2p_unrequested_blocks.py', 'feature_includeconf.py', + 'feature_asmap.py', 'rpc_deriveaddresses.py', 'rpc_deriveaddresses.py --usecli', 'rpc_scantxoutset.py', |