fuzz: add basic TxOrphanage::EraseForBlock cov #31918

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2025-02-orphanage-eraseforblock changing 1 files +18 −0
  1. instagibbs commented at 7:07 PM on February 20, 2025: member

    Currently uncovered

  2. fuzz: add basic TxOrphanage::EraseForBlock cov 8400b742fa
  3. DrahtBot commented at 7:07 PM on February 20, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK dergoegge, marcofleon

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

  4. DrahtBot added the label Tests on Feb 20, 2025
  5. fanquake requested review from glozow on Feb 20, 2025
  6. fanquake requested review from marcofleon on Feb 20, 2025
  7. dergoegge approved
  8. dergoegge commented at 9:05 AM on February 21, 2025: member

    utACK 8400b742fa6dda4ad89311f547ccf50b0187e817

  9. marcofleon commented at 11:51 AM on February 21, 2025: contributor

    ACK 8400b742fa6dda4ad89311f547ccf50b0187e817

    Ran the target and checked coverage to be sure, lgtm.

  10. fanquake merged this on Feb 21, 2025
  11. fanquake closed this on Feb 21, 2025

  12. in src/test/fuzz/txorphan.cpp:207 in 8400b742fa
     198 | @@ -195,6 +199,20 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
     199 |                      Assert(!orphanage.HaveTxFromPeer(tx->GetWitnessHash(), peer_id));
     200 |                      Assert(orphanage.UsageByPeer(peer_id) == 0);
     201 |                  },
     202 | +                [&] {
     203 | +                    // Make a block out of txs and then EraseForBlock
     204 | +                    CBlock block;
     205 | +                    int num_txs = fuzzed_data_provider.ConsumeIntegralInRange<unsigned int>(0, 1000);
     206 | +                    for (int i{0}; i < num_txs; ++i) {
     207 | +                        auto& tx_to_remove = PickValue(fuzzed_data_provider, tx_history);
    


    glozow commented at 4:14 PM on February 24, 2025:

    Maybe would have been cool to make the fuzzer generate a tx, that way can have non-identical but conflicting txns.

  13. glozow commented at 4:14 PM on February 24, 2025: member

    post merge code review ACK

  14. sedited referenced this in commit 2cab7a09ea on Mar 16, 2025
  15. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  16. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  17. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  18. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  19. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  20. bug-castercv502 referenced this in commit a6aeab1eeb on Sep 28, 2025
  21. ivanlele referenced this in commit 0566f4b83d on Apr 16, 2026
  22. Kino1994 referenced this in commit 4a1e137f42 on Jun 28, 2026
  23. BigcoinBGC referenced this in commit 1834cfd5d3 on Jun 30, 2026
  24. bitcoin locked this on Jul 30, 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-08-06 18:52 UTC

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