You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if `-asmap` is specified without a filename bitcoind tries to load
`ip_asn.map` data file.
This change now requires `-asmap=ip_asn.map` or another filename to be
specified explicitly.
The change is intended to make behavior of the option explicit avoid confusion
reported #33386 where documentation
specifies a default file which is not actually loaded by default. It was
originally implemented in
#33631 (comment) and
various alternatives are discussed there.
In previous releases, if `-asmap` was specified without a filename, this would try to load an `ip_asn.map` data file. Now loading an asmap file requires an explicit filename like `-asmap=ip_asn.map`. This change was made to make the option easier to understand, because it was confusing for there to be a default filename not actually loaded by default (https://github.com/bitcoin/bitcoin/issues/33386). Also this change makes the option more future-proof, because in upcoming releases, specifying `-asmap` will load embedded asmap data instead of an external file (https://github.com/bitcoin/bitcoin/pull/28792).
argsman.AddArg("-addnode=<ip>", strprintf("Add a node to connect to and attempt to keep the connection open (see the addnode RPC help for more info). This option can be specified multiple times to add multiple nodes; connections are limited to %u at a time and are counted separately from the -maxconnections limit.", MAX_ADDNODE_CONNECTIONS), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
535
-
argsman.AddArg("-asmap=<file>", strprintf("Specify asn mapping used for bucketing of the peers (default: %s). Relative paths will be prefixed by the net-specific datadir location.", DEFAULT_ASMAP_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
534
+
argsman.AddArg("-asmap=<file>", strprintf("Specify asn mapping used for bucketing of the peers (default: none). Relative paths will be prefixed by the net-specific datadir location."), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
536
535
argsman.AddArg("-bantime=<n>", strprintf("Default duration (in seconds) of manually configured bans (default: %u)", DEFAULT_MISBEHAVING_BANTIME), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
537
536
argsman.AddArg("-bind=<addr>[:<port>][=onion]", strprintf("Bind to given address and always listen on it (default: 0.0.0.0). Use [host]:port notation for IPv6. Append =onion to tag any incoming connections to that address and port as incoming Tor connections (default: 127.0.0.1:%u=onion, testnet3: 127.0.0.1:%u=onion, testnet4: 127.0.0.1:%u=onion, signet: 127.0.0.1:%u=onion, regtest: 127.0.0.1:%u=onion)", defaultChainParams->GetDefaultPort() + 1, testnetChainParams->GetDefaultPort() + 1, testnet4ChainParams->GetDefaultPort() + 1, signetChainParams->GetDefaultPort() + 1, regtestChainParams->GetDefaultPort() + 1), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
538
537
argsman.AddArg("-cjdnsreachable", "If set, then this host is configured for CJDNS (connecting to fc00::/8 addresses would lead us to the CJDNS network, see doc/cjdns.md) (default: 0)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
Copy file name to clipboardExpand all lines: test/functional/feature_asmap.py
+22-40Lines changed: 22 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,9 @@
4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
"""Test asmap config argument for ASN-based IP bucketing.
6
6
7
-
Verify node behaviour and debug log when launching bitcoind in these cases:
8
-
9
-
1. `bitcoind` with no -asmap arg, using /16 prefix for IP bucketing
10
-
11
-
2. `bitcoind -asmap=<absolute path>`, using the unit test skeleton asmap
12
-
13
-
3. `bitcoind -asmap=<relative path>`, using the unit test skeleton asmap
14
-
15
-
4. `bitcoind -asmap/-asmap=` with no file specified, using the default asmap
16
-
17
-
5. `bitcoind -asmap` restart with an addrman containing new and tried entries
18
-
19
-
6. `bitcoind -asmap` with no file specified and a missing default asmap file
20
-
21
-
7. `bitcoind -asmap` with an empty (unparsable) default asmap file
7
+
Verify node behaviour and debug log when launching bitcoind with different
8
+
`-asmap` and `-noasmap` arg values, including absolute and relative paths, and
0 commit comments