HomePhabricator

Refactor EraseLastKElements to be a special case of EraseLastKElementsIf

Description

Refactor EraseLastKElements to be a special case of EraseLastKElementsIf

Summary:
This combines EraseLastKElementsIf (introduced in D9863) with the existing EraseLastKElements function by using a default return true predicate.

This is a backport of core#20197 [5/6]
https://github.com/bitcoin/bitcoin/pull/20197/commits/8f1a53eb027727a4c0eaac6d82f0a8279549f638
Depends on D10978

Test Plan:
ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Jon Atack <jon@atack.com>Authored on Oct 20 2020, 06:28
PiRKCommitted on Feb 4 2022, 10:59
PiRKPushed on Feb 4 2022, 10:59
Reviewer
Restricted Project
Differential Revision
D10979: Refactor EraseLastKElements to be a special case of EraseLastKElementsIf
Parents
rABCe1af69cbcebf: Add unit tests for ProtectEvictionCandidatesByRatio()
Branches
Unknown
Tags
Unknown