Skip to content

[switch] Connection manager and PeerBook report different numbers of connected peers #428

Closed
@jacobheun

Description

@jacobheun

Logging out some stats on a running node, eventually the number of peers reported as connected via the Connection Manager and PeerBook starts to differ pretty dramatically. In this instance almost 160 peers.

Connection manager is tracking 409 peers
PeerBook has 578 connected peers

The Connection Manager connections are taken directly from the _peers map in the connection manager. The mapping is updated anytime a muxed connection is created or ends.

The PeerBook connections are determined by the PeerInfo instances in PeerBook that return an address from PeerInfo.isConnected(). These numbers should match. If not, the connection manager might not be pruning connections at the correct high water mark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions