Skip to content

Commit

Permalink
Merge bitcoin#26281: docs: fix m_children to be a member of CTxMemPoo…
Browse files Browse the repository at this point in the history
…lEntry

01bf4af docs: fix m_children to be a member of CTxMemPoolEntry (stickies-v)

Pull request description:

  Small documentation fix to reflect that `m_children` [is a member](https://github.com/bitcoin/bitcoin/blob/73b61717a977fc9d23f1bae3f8620641a9dee1f3/src/txmempool.h#L99) of `CTxMemPoolEntry`, not `CTxMemPool`

ACKs for top commit:
  hebasto:
    ACK 01bf4af, wrong wording was introduced in bitcoin#19478.
  glozow:
    ACK 01bf4af

Tree-SHA512: b66c43b92fda44682b1f67c43073ca9e133a6dc03cd28253e571e67170531138c20b22ffdb08f312fb2d47a1f869b876611646b54325c8b614d12049befad578
  • Loading branch information
glozow authored and PastaPastaPasta committed Feb 13, 2025
1 parent 1ce4ca1 commit c7ca95e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/txmempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashes
// Iterate in reverse, so that whenever we are looking at a transaction
// we are sure that all in-mempool descendants have already been processed.
// 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.
for (const uint256 &hash : reverse_iterate(vHashesToUpdate)) {
// calculate children from mapNextTx
Expand All @@ -200,7 +200,7 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashes
continue;
}
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.
// we cache the in-mempool children to avoid duplicate updates
{
Expand Down
2 changes: 1 addition & 1 deletion src/txmempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ class CTxMemPool
* mempool but may have child transactions in the mempool, eg during a
* 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.
* @pre cachedDescendants is an accurate cache where each entry has all
* descendants of the corresponding key, including those that should
Expand Down

0 comments on commit c7ca95e

Please sign in to comment.