doc: mempool: fix removeUnchecked incorrect comment #34375

pull ismaelsadeeq wants to merge 1 commits into bitcoin:master from ismaelsadeeq:01-2026-fix-removeUnchecked-doc changing 1 files +1 −8
  1. ismaelsadeeq commented at 8:16 pm on January 21, 2026: member
    CTxMemPool::removeUnchecked description comment is stale and incorrect; the behaviour being described no longer applies in the post-cluster world. This PR is a simple fix that attempts to correctly describe what is being done in removeUnchecked.
  2. DrahtBot added the label Docs on Jan 21, 2026
  3. DrahtBot commented at 8:17 pm on January 21, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34375.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sipa, instagibbs

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. in src/txmempool.h:592 in 1a1abdcc0a
    595-     *  CTxMemPoolEntry's m_parents in order to walk ancestors of a
    596-     *  given transaction that is removed, so we can't remove intermediate
    597-     *  transactions in a chain before we've updated all the state for the
    598-     *  removal.
    599-     */
    600+    /* Erase this entry from mapTx; this erasure should trigger the removal of the entry Ref from txgraph.
    


    instagibbs commented at 9:28 pm on January 21, 2026:

    I’m not sure just naming more things it touches vs letting the user read what it touches is better.

    Is there something more high level we can add? (no helpful suggestions sorry :( )


    ismaelsadeeq commented at 11:21 am on January 22, 2026:

    I’m not sure just naming more things it touches vs letting the user read what it touches is better.

    You are right; I am also not a huge fan of these comments that describe what is obvious in code, as they can easily become stale, requiring updates (like this). But I don’t mind them either as long as they are correct. I couldn’t come up with anything better, and would like to see the status quo issue fixed; that’s why I pushed this.

    Is there something more high level we can add?

    The only implicit thing is the eviction from the txgraph

    no helpful suggestions sorry :( )

    Happy to update to.

    0/* Removal from the mempool also triggers removal of the entry Ref from txgraph*/
    

    Let me know what you think?


    instagibbs commented at 1:49 pm on January 22, 2026:
    definitely better

    ismaelsadeeq commented at 2:11 pm on January 22, 2026:
    Done.
  5. ismaelsadeeq force-pushed on Jan 22, 2026
  6. doc: mempool: fix `removeUnchecked` incorrect comment
    - CTxMemPool::removeUnchecked description comment is stale and incorrect
      after cluster mempool.
      This commit fixes the issue by deleting the stale comment and describing
      only the implicit behaviour triggered by the method.
    1137debb85
  7. ismaelsadeeq force-pushed on Jan 22, 2026
  8. DrahtBot added the label CI failed on Jan 22, 2026
  9. sipa commented at 2:21 pm on January 22, 2026: member
    ACK 1137debb85306063f1660bc15850979e7db88fb8
  10. instagibbs commented at 2:25 pm on January 22, 2026: member
    ACK 1137debb85306063f1660bc15850979e7db88fb8
  11. fanquake merged this on Jan 22, 2026
  12. fanquake closed this on Jan 22, 2026

  13. ismaelsadeeq deleted the branch on Jan 22, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-22 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me