Page MenuHomePhabricator

[avalanche] Add the notion of Peer to the PeerManager
ClosedPublic

Authored by deadalnix on Jul 4 2020, 01:00.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb406ddfc609f: [avalanche] Add the notion of Peer to the PeerManager
Summary

An avalanche Peer can be one or more nodes, so that a large peer can instanciate several nodes to be able to serve more requests.

This allows to rework the compactions algorithm to make it much simpler.

Test Plan
ninja check-avalanche

The update of the verify function should check that the Peer remain in a coherent state.

Event Timeline

deadalnix updated this revision to Diff 21993.

vetor => vector

There is a better way to do this using multi index magic.

Simplify the Peer struct so that it doesn't contain nodes. Nodes wills be stored in their own datastructure later on.

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/peermanager.cpp
54 ↗(On Diff #22008)

Nit: alocation => allocation

This revision is now accepted and ready to land.Jul 6 2020, 06:02