Page MenuHomePhabricator

[avalanche] Add a comparator for proof shared pointers
ClosedPublic

Authored by Fabien on Sep 30 2021, 08:28.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC97c8ab66348b: [avalanche] Add a comparator for proof shared pointers
Summary

This will be useful for sorting proofs by score. Extracted from D10027.

Ref T1854.

Test Plan
ninja check-avalanche-proof_tests

Event Timeline

Fabien requested review of this revision.Sep 30 2021, 08:28
deadalnix requested changes to this revision.Sep 30 2021, 15:43
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/avalanche/proofcomparator.h
28 ↗(On Diff #30225)

This calls for a ternary.

src/avalanche/test/proof_tests.cpp
655 ↗(On Diff #30225)

Put it in its own test, no? That is this much less to recompile at once and it can run in parallel. If the header is different, then the test might as well be.

This revision now requires changes to proceed.Sep 30 2021, 15:43

Address feedback.
Note to reviewers: the test needs a TestingSetup fixture in order to initialize the coin db required when calling buildRandomProof().

This revision is now accepted and ready to land.Oct 1 2021, 13:34