HomePhabricator

rpc: Add listen address to incoming connections in `getpeerinfo`

Description

rpc: Add listen address to incoming connections in getpeerinfo

Summary:

  • rpc: Add listen address to incoming connections in getpeerinfo

This adds the listening address on which incoming connections were received to the
CNode and CNodeStats structures.

The address is reported in getpeerinfo.

This can be useful for distinguishing connections received on different listening ports
(e.g. when using a different listening port for Tor hidden service connections)
or different networks.

  • test: Add test for getpeerinfo bindaddr field

This is a backport of Core PR10478

Depends on D1750 and D1756

Test Plan:

make check

Reviewers: #bitcoin_abc, schancel

Reviewed By: #bitcoin_abc, schancel

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1757

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on May 30 2017, 09:59
deadalnixCommitted on Sep 10 2018, 21:54
deadalnixPushed on Sep 10 2018, 21:54
Reviewer
Restricted Project
Differential Revision
D1757: rpc: Add listen address to incoming connections in `getpeerinfo`
Parents
rABC4bc3457d0c78: make CNode::id private
Branches
Unknown
Tags
Unknown