HomePhabricator

Replace `struct update_lock_points` with lambda

Description

Replace struct update_lock_points with lambda

Summary:
No behavior change.
This code was introduced in 5add7a7 before we required C++11, which is
why the struct was needed. As we are now using more modern C++ and this
is the only place where lockpoints are updated for mempool entries, it
is more idiomatic to call modify with a lambda.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

This concludes backport of core#23976
https://github.com/bitcoin/bitcoin/pull/23976/commits/e177fcab3831b6d259da5164cabedcc9e78f6957

Depends on D12587

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
glozow <gloriajzhao@gmail.com>Authored on Jan 17 2022, 10:24
PiRKCommitted on Nov 24 2022, 09:00
PiRKPushed on Nov 24 2022, 09:00
Reviewer
Restricted Project
Differential Revision
D12588: Replace `struct update_lock_points` with lambda
Parents
rABC597f5af02b1d: document and clean up MaybeUpdateMempoolForReorg
Branches
Unknown
Tags
Unknown