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. txgraph: drop move assignment operator aef40b93cf
  3. 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, ajtowns

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. sipa commented at 4:25 pm on November 12, 2025: member
  5. glozow added the label Refactoring on Nov 12, 2025
  6. glozow added the label Mempool on Nov 12, 2025
  7. in src/txgraph.cpp:3454 in aef40b93cf
    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:
  8. l0rinc approved
  9. 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.

  10. instagibbs commented at 5:40 pm on November 12, 2025: member
    link to discussion, I think #33629 (review)
  11. 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.


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-11-20 00:12 UTC

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