ZcashFoundation/zebra

bug: `getpeerinfo` RPC should show inbound connections as well as outbound

teor2345 opened this issue · 0 comments

Motivation

getpeerinfo is documented to show inbound and outbound connections, but Zebra only shows outbound connections.

Also, it shows current and recent outbound connections, but it should only show current connections.

Specifications

https://zcash.github.io/rpc/getpeerinfo.html

Complex Code or Requirements

We can add a network request for a list of peers, and then use that data for the RPC.

We don't need the address book, maybe we could remove it.

This change might need to be based on PR #7859, because it makes significant changes to the peer set.

Testing

Connect to Zebra with an inbound connection and make sure it shows up. We can do this in a unit test, or manually.
Add the inbound field to the RPC so we're sure.

Follow Up Tickets

  • Change the name of AddressBook to OutboundAddressBook