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
Oh when we discussed this I thought it was returning connected addresses. I have no clue where these addresses are supposed to come from, are they a Core configurable item?
getnodeaddresses lists addresses from the Bitcoin Core IP address manager tables. These are IP addresses that presumably host reachable BItcoin nodes. Nodes gossip IP addresses through the network.
$ bitcoin-cli help getnodeaddresses
getnodeaddresses ( count "network" )
Return known addresses, after filtering for quality and recency.
These can potentially be used to find new peers in the network.
The total number of addresses known to the node may be higher.
You can use the test-only RPC addpeeraddress to add an address to the the addrman.
$ bitcoin-cli help addpeeraddress
addpeeraddress "address" port ( tried )
Add the address of a potential peer to an address manager table. This RPC is for testing only.
Arguments:
1. address (string, required) The IP address of the peer
2. port (numeric, required) The port of the peer
3. tried (boolean, optional, default=false) If true, attempt to add the peer to the tried addresses table
Result:
{ (json object)
"success" : true|false, (boolean) whether the peer address was successfully added to the address manager table
"error" : "str" (string, optional) error description, if the address could not be added
}
Activity
tcharding commentedon Aug 5, 2025
Oh when we discussed this I thought it was returning connected addresses. I have no clue where these addresses are supposed to come from, are they a Core configurable item?
Merge #321: Remove `getnodeaddresses` model
0xB10C commentedon Aug 18, 2025
getnodeaddresseslists addresses from the Bitcoin Core IP address manager tables. These are IP addresses that presumably host reachable BItcoin nodes. Nodes gossip IP addresses through the network.You can use the test-only RPC
addpeeraddressto add an address to the the addrman.tcharding commentedon Aug 19, 2025
Ah mad, nice one man!
jamillambert commentedon Aug 19, 2025
Thanks for this. It was very useful.
Merge rust-bitcoin#334: Fix `getnodeaddresses` test