diff --git a/src/txmempool.h b/src/txmempool.h index 9fc3054e3c6..e025dafd91e 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -312,16 +312,6 @@ public: } }; -struct update_lock_points -{ - explicit update_lock_points(const LockPoints& _lp) : lp(_lp) { } - - void operator() (CTxMemPoolEntry &e) { e.UpdateLockPoints(lp); } - -private: - const LockPoints& lp; -}; - // Multi_index tag names struct descendant_score {}; struct entry_time {}; diff --git a/src/validation.cpp b/src/validation.cpp index b2d253afd28..fff7cfc07b8 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -375,7 +375,7 @@ void CChainState::MaybeUpdateMempoolForReorg( } else if (!validLP) { // If CheckSequenceLocks succeeded, it also updated the LockPoints. // Now update the mempool entry lockpoints as well. - m_mempool->mapTx.modify(it, update_lock_points(lp)); + m_mempool->mapTx.modify(it, [&lp](CTxMemPoolEntry& e) { e.UpdateLockPoints(lp); }); } // If the transaction spends any coinbase outputs, it must be mature.