HomePhabricator

[avalanche] Cache the peer score

Description

[avalanche] Cache the peer score

Summary:
Since it is not possible to update the score for a proof at the moment, we can cache the value to avoid recomputing every time. This especially makes sense after D10031 since the proof score is used as a key for the peer set.

This is an optimization only and does not change the behavior.

Ref T1864.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1864

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

Details

Provenance
FabienAuthored on Sep 3 2021, 13:31
FabienPushed on Feb 24 2022, 14:07
Reviewer
Restricted Project
Differential Revision
D10032: [avalanche] Cache the peer score
Parents
rABC93920f6bb44c: [avalanche] Order the peer set by score
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task