Page MenuHomePhabricator

Add and use CBlockIndexHeightOnlyComparator
ClosedPublic

Authored by PiRK on Jan 23 2023, 10:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC2aa2529f4a7c: Add and use CBlockIndexHeightOnlyComparator
Summary

...also use std::sort for clarity

Add also a simple unit test for coverage.

This is a partial backport of core#24515
https://github.com/bitcoin/bitcoin/pull/24515/commits/28ba0313eac37e4a900b7e97af7169ce999c4024

Depends on D13022

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Jan 23 2023, 10:16
Fabien requested changes to this revision.Jan 23 2023, 14:19
Fabien added a subscriber: Fabien.

One nit, otherwise LGTM

src/test/blockindex_comparator_tests.cpp
70

Please check also when reverting the parameters

This revision now requires changes to proceed.Jan 23 2023, 14:19
This revision is now accepted and ready to land.Jan 23 2023, 15:43