txgraph: drop move assignment operator #33862

pull sipa wants to merge 1 commits into bitcoin:master from sipa:202511_no_move_txgraph_ref changing 3 files +5 −22
  1. sipa commented at 4:25 pm on November 12, 2025: member

    This removes the only place where move-assignment of TxGraph::Ref is used (in tests), and drops supports for it.

    Suggested in #33629 (review)

  2. DrahtBot commented at 4:25 pm on November 12, 2025: 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/33862.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK l0rinc, instagibbs
    Stale ACK ajtowns

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

  3. sipa commented at 4:25 pm on November 12, 2025: member
  4. glozow added the label Refactoring on Nov 12, 2025
  5. glozow added the label Mempool on Nov 12, 2025
  6. in src/txgraph.cpp:3454 in aef40b93cf outdated
    3463-    other.m_graph = nullptr;
    3464-    other.m_index = GraphIndex(-1);
    3465-    return *this;
    3466-}
    3467-
    3468 TxGraph::Ref::Ref(Ref&& other) noexcept
    


    l0rinc commented at 5:33 pm on November 12, 2025:
  7. l0rinc approved
  8. l0rinc commented at 5:35 pm on November 12, 2025: contributor

    code review ACK aef40b93cf057d2a27d61881b0858d491206bcd3

    Simplifies the public interface of TxGraph by deleting the move assignment operator only used in tests. The usage seems correct as it is currently, but left a question about the move-constructor which the fuzzers seem to be confused about.

  9. instagibbs commented at 5:40 pm on November 12, 2025: member
    link to discussion, I think #33629 (review)
  10. ajtowns commented at 11:32 am on November 13, 2025: contributor

    ACK aef40b93cf057d2a27d61881b0858d491206bcd3 – matches what I was thinking

    Adding some assertions in Ref::Ref(Ref&&) triggers when I run the fuzz binary over some txgraph corpus data I generated previously, so #33862 (review) doesn’t seem like a real problem.

  11. fanquake commented at 12:16 pm on November 25, 2025: member
    Please rebase this.
  12. txgraph: drop move assignment operator ade0397f59
  13. sipa force-pushed on Nov 25, 2025
  14. sipa commented at 12:37 pm on November 25, 2025: member
    Rebased after merge of #33629.
  15. l0rinc commented at 12:48 pm on November 25, 2025: contributor

    reACK ade0397f59f2fb59ab0e4ebb39869ac343cc54ee

    Redid the rebase (no conflicts, how come rebase was needed?) and soft reset against PR, no changed. Verifired the same with git range-diff aef40b93cf057d2a27d61881b0858d491206bcd3...ade0397f59f2fb59ab0e4ebb39869ac343cc54ee

  16. DrahtBot requested review from ajtowns on Nov 25, 2025
  17. instagibbs commented at 3:43 pm on November 25, 2025: member
    ACK ade0397f59f2fb59ab0e4ebb39869ac343cc54ee
  18. fanquake merged this on Nov 25, 2025
  19. fanquake closed this on Nov 25, 2025


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: 2025-12-10 03:13 UTC

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