-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Closed
Labels
Description
I have bitcoind serving cfilters to an LND node on my local network on separate machines. Both have 192.168.1.x
IP addresses and they connect fine using neutrino. However, the LND node does not appear in the bitcoin-cli -netinfo
table.
The reason is because if you look at the getpeerinfo
response:
{
"id": 11728,
"addr": "192.168.1.153:64367",
"addrbind": "192.168.1.13:8333",
"addrlocal": "192.168.1.13:8333",
"network": "not_publicly_routable",
"services": "0000000000000048",
"servicesnames": [
"WITNESS",
"COMPACT_FILTERS"
],
...
...so bitcoin-cli ignores the peer here:
Lines 477 to 479 in 9c47eb4
const std::string network{peer["network"].get_str()}; | |
const int8_t network_id{NetworkStringToId(network)}; | |
if (network_id == UNKNOWN_NETWORK) continue; |
...expecting one of these strings only:
Line 58 in 9c47eb4
static constexpr std::array NETWORKS{"ipv4", "ipv6", "onion", "i2p", "cjdns"}; |
I'm happy to fix / add this myself unless there's a reason? Maybe instead of skipping the peer we can just add an "unknown network" category, or "other" ...?
cc: @jonatack