0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

docs: fix m_children to be a member of CTxMemPoolEntry

This commit is contained in:
stickies-v 2022-10-07 13:48:11 +01:00
parent 33eef562a3
commit 01bf4af4f2
No known key found for this signature in database
GPG key ID: 5CB1CE6E5E66A757
2 changed files with 3 additions and 3 deletions

View file

@ -145,7 +145,7 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256>& vHashes
// Iterate in reverse, so that whenever we are looking at a transaction // Iterate in reverse, so that whenever we are looking at a transaction
// we are sure that all in-mempool descendants have already been processed. // we are sure that all in-mempool descendants have already been processed.
// This maximizes the benefit of the descendant cache and guarantees that // This maximizes the benefit of the descendant cache and guarantees that
// CTxMemPool::m_children will be updated, an assumption made in // CTxMemPoolEntry::m_children will be updated, an assumption made in
// UpdateForDescendants. // UpdateForDescendants.
for (const uint256 &hash : reverse_iterate(vHashesToUpdate)) { for (const uint256 &hash : reverse_iterate(vHashesToUpdate)) {
// calculate children from mapNextTx // calculate children from mapNextTx
@ -154,7 +154,7 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256>& vHashes
continue; continue;
} }
auto iter = mapNextTx.lower_bound(COutPoint(hash, 0)); auto iter = mapNextTx.lower_bound(COutPoint(hash, 0));
// First calculate the children, and update CTxMemPool::m_children to // First calculate the children, and update CTxMemPoolEntry::m_children to
// include them, and update their CTxMemPoolEntry::m_parents to include this tx. // include them, and update their CTxMemPoolEntry::m_parents to include this tx.
// we cache the in-mempool children to avoid duplicate updates // we cache the in-mempool children to avoid duplicate updates
{ {

View file

@ -825,7 +825,7 @@ private:
* mempool but may have child transactions in the mempool, eg during a * mempool but may have child transactions in the mempool, eg during a
* chain reorg. * chain reorg.
* *
* @pre CTxMemPool::m_children is correct for the given tx and all * @pre CTxMemPoolEntry::m_children is correct for the given tx and all
* descendants. * descendants.
* @pre cachedDescendants is an accurate cache where each entry has all * @pre cachedDescendants is an accurate cache where each entry has all
* descendants of the corresponding key, including those that should * descendants of the corresponding key, including those that should