1

According to the Bitcoin core developer reference, the RPC call getPeerInfo has in its output a field called "addrlocal" which holds our IP from the worldview of the peer.

Why is this output there? Is it used anywhere? Does it have a use case?

Furthermore, they commented that "Most SPV nodes set this to 127.0.0.1:8333", why would an SPV node do that?

2

Why is this output there?

Because it is part of the version P2P message. getpeerinfo largely outputs the information provided by the version message.

Is it used anywhere? Does it have a use case?

Currently, no. However it may have been included in the version message because Bitcoin was originally designed for things to go directly to IP addresses. There used to be a Pay-to-IP thing where this could have been useful.

Furthermore, they commented that "Most SPV nodes set this to 127.0.0.1:8333", why would an SPV node do that?

Because it is easier to implement and no one actually uses it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.