diff options
author | glozow <gloriajzhao@gmail.com> | 2023-08-30 16:27:14 +0100 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-11-10 16:44:39 +0100 |
commit | 333367a9407701b5077e2457b1a6aa8ff5e4934b (patch) | |
tree | e22d7775f2bbd545e7cce2e25ba102a4cfcd0dcd /src/kernel | |
parent | 1bf4855016e777dd8b424fe01750f9e3e97931a2 (diff) | |
download | bitcoin-333367a9407701b5077e2457b1a6aa8ff5e4934b.tar.xz |
[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.
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/mempool_entry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/mempool_entry.h b/src/kernel/mempool_entry.h index edd95e8d53..c1478c0105 100644 --- a/src/kernel/mempool_entry.h +++ b/src/kernel/mempool_entry.h @@ -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; } |