Page MenuHomePhabricator

[avalanche] Create a generic vote map that can have any kind of item being voted on
ClosedPublic

Authored by Fabien on Jan 13 2023, 20:28.

Details

Summary

For now the vote maps are typed, there is one for blocks and one for proofs.
This diff creates a new structure that maps a std::variant so that any kind of type can be added to it. It will be used to factorized and simplify the code when we add transactions to the polls.

This structure is currently unused outside of its unit test.

Test Plan
ninja check-avalanche

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jan 13 2023, 20:28
Fabien planned changes to this revision.Jan 14 2023, 10:13

Rename the type expansion/deduction structure, and use a better way to reverse the block comparator output

PiRK requested changes to this revision.Jan 16 2023, 08:12
PiRK added a subscriber: PiRK.

Looks good except for nits

src/avalanche/processor.h
109 ↗(On Diff #37537)

purposes

113 ↗(On Diff #37537)

layout

This revision now requires changes to proceed.Jan 16 2023, 08:12
This revision is now accepted and ready to land.Jan 16 2023, 09:56