HomePhabricator

[avalanche] Refactor the vote records to inv extraction loop

Description

[avalanche] Refactor the vote records to inv extraction loop

Summary:
This factorizes the code used to extract invs from the vote records.

It fixes a bug than can lead to polling AVALANCHE_MAX_ELEMENT_POLL + 1 elements and adds a test for this case.

Ref T1854.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix, PiRK

Maniphest Tasks: T1854

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

Details

Provenance
FabienAuthored on Oct 13 2021, 14:41
FabienPushed on Oct 27 2021, 07:17
Reviewer
Restricted Project
Differential Revision
D10327: [avalanche] Refactor the vote records to inv extraction loop
Parents
rABCf380d4e818a0: [avalanche] Remove the invalid peers before the orphans rescan
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task