Page MenuHomePhabricator

[avalanche] Improve API for setContenderStatusForLocalWinners
Needs RevisionPublic

Authored by roqqit on Wed, Feb 12, 19:03.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

These changes make this function more testable and prepares it for
reconciling pollable contenders without re-calling getPollableContenders
unnecessarily.

Inspired by this feedback: https://reviews.bitcoinabc.org/D17607#inline-77172

Test Plan
ninja check-avalanche

Diff Detail

Event Timeline

roqqit requested review of this revision.Wed, Feb 12, 19:03
Fabien requested changes to this revision.Wed, Feb 12, 22:32
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/avalanche/processor.cpp
926

You should create another version that takes only pindex to avoid this pattern:

bool Processor::setContenderStatusForLocalWinners(const CBlockIndex *pindex) {
    std::vector<StakeContenderId> dummy;
    return setContenderStatusForLocalWinners(pindex, dummy);
}
This revision now requires changes to proceed.Wed, Feb 12, 22:32