doc: Expand documentation on asmap feature and tooling
What changed, and why it matters
This commit only updates user-facing documentation and help text. It adds a short README entry describing the asmap utility folder and expands the command-line help message for the -asmap option to mention embedded mapping data when that feature is compiled in. There are no code logic changes, no bug fixes, and no security-relevant behavior changes.
No security action needed. This is a documentation-only change and can be reviewed as normal project documentation.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is purely documentation/help-text. contrib/README.md gains a one-line section pointer to contrib/asmap. src/init.cpp’s SetupServerArgs updates the -asmap argument description to conditionally include a sentence about embedded mapping data when ENABLE_EMBEDDED_ASMAP is defined. No functional code is modified.
Changed components
contrib/README.mdsrc/init.cpp (help text only)Inspect captured patch +10 / −1
diff --git a/contrib/README.md b/contrib/README.md
index f23d7ac5..037ea2f0 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -18,6 +18,9 @@ A Linux bash script that will set up traffic control (tc) to limit the outgoing
### [Seeds](/contrib/seeds) ###
Utility to generate the pnSeed[] array that is compiled into the client.
+### [ASMap](/contrib/asmap) ###
+Utilities to analyze and process asmap files.
+
Build Tools and Keys
---------------------
diff --git a/src/init.cpp b/src/init.cpp
index 6cbeea3c..e5cff47d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -534,7 +534,13 @@ void SetupServerArgs(ArgsManager& argsman, bool can_listen_ipc)
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
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);
- argsman.AddArg("-asmap=<file>", "Specify asn mapping used for bucketing of the peers. Relative paths will be prefixed by the net-specific datadir location.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
+ argsman.AddArg("-asmap=<file>", strprintf("Specify asn mapping used for bucketing of the peers. Relative paths will be prefixed by the net-specific datadir location.%s",
+ #ifdef ENABLE_EMBEDDED_ASMAP
+ " If a bool arg is given (-asmap or -asmap=1), the embedded mapping data in the binary will be used."
+ #else
+ ""
+ #endif
+ ), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
argsman.AddArg("-bantime=<n>", strprintf("Default duration (in seconds) of manually configured bans (default: %u)", DEFAULT_MISBEHAVING_BANTIME), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
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);
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);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.