Page MenuHomePhabricator

[avalanche] Order the peer set by score
ClosedPublic

Authored by Fabien on Sep 3 2021, 11:59.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC93920f6bb44c: [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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_peers_ordered_by_score
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16542
Build 32946: Build Diffbuild-diff · build-clang-tidy · build-without-wallet · lint-circular-dependencies · build-clang · build-debug
Build 32945: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Sep 3 2021, 11:59
This revision is now accepted and ready to land.Sep 3 2021, 14:46

Improve the test variable name and make it easier to read what is the expected ordering. No change in behavior.

Fabien added a child revision: Restricted Differential Revision.Sep 3 2021, 20:29
Fabien planned changes to this revision.Sep 28 2021, 19:05
Fabien edited the summary of this revision. (Show Details)
Fabien added a task: Restricted Maniphest Task.

Rebase and repurpose (summary update only).

This revision is now accepted and ready to land.Nov 23 2021, 13:28
Fabien planned changes to this revision.Jan 28 2022, 19:17
This revision is now accepted and ready to land.Feb 23 2022, 17:43
Fabien added a task: Restricted Maniphest Task.
Fabien removed a task: Restricted Maniphest Task.Feb 24 2022, 14:00
This revision was automatically updated to reflect the committed changes.