Skip to content

Commit a16917f

Browse files
brunoergjonatack
andcommitted
rpc, net: improve mapped_as doc for getrawaddrman/getpeerinfo
Before, we did not explicity say that both fields `{source_}mapped_as` (that are optional in getrawaddrman) will be only available if the asmap config flag is set. Co-authored-by: Jon Atack <jon@atack.com>
1 parent bdad024 commit a16917f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
678678
" \".\" - we do not relay addresses to this peer (addr_relay_enabled is false)\n"
679679
" addrl Total number of addresses dropped due to rate limiting\n"
680680
" age Duration of connection to the peer, in minutes\n"
681-
" asmap Mapped AS (Autonomous System) number in the BGP route to the peer, used for diversifying\n"
681+
" asmap Mapped AS (Autonomous System) number at the end of the BGP route to the peer, used for diversifying\n"
682682
" peer selection (only displayed if the -asmap config option is set)\n"
683683
" id Peer index, in increasing order of peer connections since node startup\n"
684684
" address IP address and port of the peer\n"

src/rpc/net.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ static RPCHelpMan getpeerinfo()
129129
{RPCResult::Type::STR, "addrbind", /*optional=*/true, "(ip:port) Bind address of the connection to the peer"},
130130
{RPCResult::Type::STR, "addrlocal", /*optional=*/true, "(ip:port) Local address as reported by the peer"},
131131
{RPCResult::Type::STR, "network", "Network (" + Join(GetNetworkNames(/*append_unroutable=*/true), ", ") + ")"},
132-
{RPCResult::Type::NUM, "mapped_as", /*optional=*/true, "The AS in the BGP route to the peer used for diversifying\n"
133-
"peer selection (only available if the asmap config flag is set)"},
132+
{RPCResult::Type::NUM, "mapped_as", /*optional=*/true, "Mapped AS (Autonomous System) number at the end of the BGP route to the peer, used for diversifying\n"
133+
"peer selection (only displayed if the -asmap config option is set)"},
134134
{RPCResult::Type::STR_HEX, "services", "The services offered"},
135135
{RPCResult::Type::ARR, "servicesnames", "the services offered, in human-readable form",
136136
{
@@ -1150,14 +1150,14 @@ static RPCHelpMan getrawaddrman()
11501150
{RPCResult::Type::OBJ_DYN, "table", "buckets with addresses in the address manager table ( new, tried )", {
11511151
{RPCResult::Type::OBJ, "bucket/position", "the location in the address manager table (<bucket>/<position>)", {
11521152
{RPCResult::Type::STR, "address", "The address of the node"},
1153-
{RPCResult::Type::NUM, "mapped_as", /*optional=*/true, "The ASN mapped to the IP of this peer per our current ASMap"},
1153+
{RPCResult::Type::NUM, "mapped_as", /*optional=*/true, "Mapped AS (Autonomous System) number at the end of the BGP route to the peer, used for diversifying peer selection (only displayed if the -asmap config option is set)"},
11541154
{RPCResult::Type::NUM, "port", "The port number of the node"},
11551155
{RPCResult::Type::STR, "network", "The network (" + Join(GetNetworkNames(), ", ") + ") of the address"},
11561156
{RPCResult::Type::NUM, "services", "The services offered by the node"},
11571157
{RPCResult::Type::NUM_TIME, "time", "The " + UNIX_EPOCH_TIME + " when the node was last seen"},
11581158
{RPCResult::Type::STR, "source", "The address that relayed the address to us"},
11591159
{RPCResult::Type::STR, "source_network", "The network (" + Join(GetNetworkNames(), ", ") + ") of the source address"},
1160-
{RPCResult::Type::NUM, "source_mapped_as", /*optional=*/true, "The ASN mapped to the IP of this peer's source per our current ASMap"}
1160+
{RPCResult::Type::NUM, "source_mapped_as", /*optional=*/true, "Mapped AS (Autonomous System) number at the end of the BGP route to the source, used for diversifying peer selection (only displayed if the -asmap config option is set)"}
11611161
}}
11621162
}}
11631163
}

0 commit comments

Comments
 (0)