aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2021-11-04 12:23:32 -0400
committerglozow <gloriajzhao@gmail.com>2021-11-04 12:38:13 -0400
commitfd92b0c3986b9eb41ce28eb602f56d405bdd3cd7 (patch)
tree290ed4addb63a54a4e5af2395a18f88985d122d6 /src/validation.cpp
parent3d3e4598b6e570b1f8248b1ee43ec59165a3ff5c (diff)
downloadbitcoin-fd92b0c3986b9eb41ce28eb602f56d405bdd3cd7.tar.xz
document workspace members
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 00a2b03411..c444b65f27 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -497,17 +497,29 @@ private:
// of checking a given transaction.
struct Workspace {
explicit Workspace(const CTransactionRef& ptx) : m_ptx(ptx), m_hash(ptx->GetHash()) {}
+ /** Txids of mempool transactions that this transaction directly conflicts with. */
std::set<uint256> m_conflicts;
+ /** Iterators to mempool entries that this transaction directly conflicts with. */
CTxMemPool::setEntries m_iters_conflicting;
+ /** Iterators to all mempool entries that would be replaced by this transaction, including
+ * those it directly conflicts with and their descendants. */
CTxMemPool::setEntries m_all_conflicting;
+ /** All mempool ancestors of this transaction. */
CTxMemPool::setEntries m_ancestors;
+ /** Mempool entry constructed for this transaction. Constructed in PreChecks() but not
+ * inserted into the mempool until Finalize(). */
std::unique_ptr<CTxMemPoolEntry> m_entry;
+ /** Pointers to the transactions that have been removed from the mempool and replaced by
+ * this transaction, used to return to the MemPoolAccept caller. Only populated if
+ * validation is successful and the original transactions are removed. */
std::list<CTransactionRef> m_replaced_transactions;
/** Virtual size of the transaction as used by the mempool, calculated using serialized size
* of the transaction and sigops. */
int64_t m_vsize;
+ /** Fees paid by this transaction: total input amounts subtracted by total output amounts. */
CAmount m_base_fees;
+ /** Base fees + any fee delta set by the user with prioritisetransaction. */
CAmount m_modified_fees;
/** Total modified fees of all transactions being replaced. */
CAmount m_conflicting_fees{0};
@@ -515,6 +527,7 @@ private:
size_t m_conflicting_size{0};
const CTransactionRef& m_ptx;
+ /** Txid. */
const uint256& m_hash;
TxValidationState m_state;
/** A temporary cache containing serialized transaction data for signature verification.