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