Skip to content

Commit 333367a

Browse files
glozowTheCharlatan
authored andcommitted
[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.
1 parent 1bf4855 commit 333367a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kernel/mempool_entry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CTxMemPoolEntry
8383
const bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
8484
const int64_t sigOpCost; //!< Total sigop cost
8585
CAmount m_modified_fee; //!< Used for determining the priority of the transaction for mining in a block
86-
LockPoints lockPoints; //!< Track the height and time at which tx was final
86+
mutable LockPoints lockPoints; //!< Track the height and time at which tx was final
8787

8888
// Information about descendants of this transaction that are in the
8989
// mempool; if we remove this transaction we must remove all of these
@@ -151,7 +151,7 @@ class CTxMemPoolEntry
151151
}
152152

153153
// Update the LockPoints after a reorg
154-
void UpdateLockPoints(const LockPoints& lp)
154+
void UpdateLockPoints(const LockPoints& lp) const
155155
{
156156
lockPoints = lp;
157157
}

0 commit comments

Comments
 (0)