HomePhabricator

[avalanche] Order the peer set by score

Description

[avalanche] Order the peer set by score

Summary:
This diff adds an ordered view to the peer set so that highest scores are placed first. This will be useful for selecting the peers we want to get nodes for.

Another diff will cache the score so it's not recomputed every time when it's not needed.

Ref T1864.

Test Plan:

ninja check-avalanche

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696, T1864

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

Details

Provenance
FabienAuthored on Nov 23 2021, 13:26
FabienPushed on Feb 24 2022, 14:00
Reviewer
Restricted Project
Differential Revision
D10031: [avalanche] Order the peer set by score
Parents
rABC6576374b2a13: Declare de facto const member functions or reference variables as const
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task