[txmempool] make CTxMemPoolEntry::lockPoints mutable

Allows calling UpdateLockPoints() with a (const) txiter. Note that this
was already possible for caller using mapTx.modify(txiter). The point
here is to not be accessing mapTx when doing so.
This commit is contained in:
glozow 2023-08-30 16:27:14 +01:00 committed by TheCharlatan
parent 1bf4855016
commit 333367a940
No known key found for this signature in database
GPG key ID: 9B79B45691DB4173

View file

@ -83,7 +83,7 @@ private:
const bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
const int64_t sigOpCost; //!< Total sigop cost
CAmount m_modified_fee; //!< Used for determining the priority of the transaction for mining in a block
LockPoints lockPoints; //!< Track the height and time at which tx was final
mutable LockPoints lockPoints; //!< Track the height and time at which tx was final
// Information about descendants of this transaction that are in the
// mempool; if we remove this transaction we must remove all of these
@ -151,7 +151,7 @@ public:
}
// Update the LockPoints after a reorg
void UpdateLockPoints(const LockPoints& lp)
void UpdateLockPoints(const LockPoints& lp) const
{
lockPoints = lp;
}