HomePhabricator

style-only: No need for std::pair for vSortedByHeight

Description

style-only: No need for std::pair for vSortedByHeight

Summary:
...since the height information in already in CBlockIndex* and we can
use an easy custom sorter.

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

Also includes a comment removal from https://github.com/bitcoin/bitcoin/pull/24515/commits/3bbb6fea051f4e19bd2448e401a6c4e9b4cc7a41
The rest of this commit is already done in Bitcoin ABC (review of D12993 and D12994)

Depends on D13020

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Mar 3 2022, 20:05
PiRKCommitted on Jan 23 2023, 15:48
PiRKPushed on Jan 23 2023, 15:48
Reviewer
Restricted Project
Differential Revision
D13021: style-only: No need for std::pair for vSortedByHeight
Parents
rABC5c7e567e1de7: refactor: more const annotations for uses of CBlockIndex*
Branches
Unknown
Tags
Unknown