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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_shared_proof_comparator
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16821
Build 33485: Build Difflint-circular-dependencies · build-debug · build-diff · build-without-wallet · build-clang · build-clang-tidy
Build 33484: arc lint + arc unit

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

This calls for a ternary.

src/avalanche/test/proof_tests.cpp
655

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