HomePhabricator

Add and use CBlockIndexHeightOnlyComparator

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13023

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Mar 15 2022, 23:19
PiRKCommitted on Jan 23 2023, 15:48
PiRKPushed on Jan 23 2023, 15:48
Reviewer
Restricted Project
Differential Revision
D13023: Add and use CBlockIndexHeightOnlyComparator
Parents
rABC3d50222404e8: Only load BlockMan in BlockMan member functions
Branches
Unknown
Tags
Unknown