fuzz: Move implementations of non-template fuzz helpers from util.h to util.cpp #22445

pull sriramdvt wants to merge 1 commits into bitcoin:master from sriramdvt:fuzz_move changing 2 files +163 −147
  1. sriramdvt commented at 12:19 PM on July 14, 2021: contributor

    There are 78 cpp files that include util.h (grep -iIr "#include <test/fuzz/util.h>" src/test/fuzz | wc -l). Modifying the implementation of a fuzz helper in src/test/fuzz/util.h will cause all fuzz tests to be recompiled. Keeping the declarations of these non-template fuzz helpers in util.h and moving their implementations to util.cpp will skip the redundant recompilation of all the fuzz tests, and builds these helpers only once in util.cpp.

    Functions moved from util.h to util.cpp:

    • ConsumeTxMemPoolEntry
    • ContainsSpentInput
    • ConsumeNetAddr
    • Methods of FuzzedFileProvider::(open, read, write, seek, close)
  2. fanquake added the label Tests on Jul 14, 2021
  3. kristapsk approved
  4. kristapsk commented at 12:23 PM on July 14, 2021: contributor

    utACK 6abf29492fba1408c874972e7c0e2afc4d84501e

  5. MarcoFalke commented at 12:43 PM on July 14, 2021: member

    Nice. Concept ACK.

    Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits

  6. Move implementations of non-template fuzz helpers
    Moved implementations of `ConsumeTxMemPoolEntry`, `ContainsSpentInput`, `ConsumeNetAddr`, and the methods(open, read, write, seek, close) of FuzzedFileProvider from test/fuzz/util.h to test/fuzz/util.cpp.
    a2aca207b1
  7. sriramdvt force-pushed on Jul 14, 2021
  8. theStack commented at 8:13 PM on July 14, 2021: member

    Concept ACK

  9. MarcoFalke commented at 8:41 AM on July 16, 2021: member

    review ACK a2aca207b1ad00ec05d7533dbd75bbff830e1d75 🍂

    reviewed with: git show a2aca207b1ad00ec05d7533dbd75bbff830e1d75 --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    review ACK a2aca207b1ad00ec05d7533dbd75bbff830e1d75 🍂
    
    reviewed with:
    git show a2aca207b1ad00ec05d7533dbd75bbff830e1d75 --color-moved=dimmed-zebra  --color-moved-ws=ignore-all-space
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUiU8wv/exBlSHJsxQWHuaqEY1I9i6MgEuRCL0kwKrGkqcFksqEi+m+9twfOKDwX
    PSg9yhSAGkBnEMefZjfuvY49UpghZ5R/8ur4+bm3nSUkwVeq55MmUL6GO6cGzKzx
    vU24RhvVwB1eMZTX6o6KDOumKpYtRXTm09+t+L/NsWbnt+o/azWPKsV2UUU/wsC0
    0Ph1i5SgFgpMd3pfXzGrU6/AOmK5CqN0dK5NGj/pEfF8cAm5N+BCRVI49FvCAu8c
    5rKdlcnpHW6tcDCPxcKH2im/CVQx6SXZBRsh2I8KH/OVgGFRGLpxvbVUazIuVVKE
    LsezETOEqio6wZacpBXSSVV/eh1kNhs45NVj2vSmYq2Mbx2l6XdMLIEt4mk42IEZ
    L7Daxky18E5xnCG1GChWf0CBa70PwUScSrJAJaEyt7cP08WvSYOR7f5WmqJ4eBjK
    pMKwwVEuSVXZFNF67X7Yeav4lMkZjA8JtQFFuXj0XuTgksr48JgkTZCfDzI4f8t/
    OeaXoZEC
    =OjnR
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash a68bd1199081ef367925d3f633cddc5d34c485b33bbba693b151eb7f0eb39a95 -

    </details>

  10. MarcoFalke merged this on Jul 18, 2021
  11. MarcoFalke closed this on Jul 18, 2021

  12. sidhujag referenced this in commit be99cf4d2b on Jul 23, 2021
  13. gwillen referenced this in commit bc829ae9d6 on Jun 1, 2022
  14. DrahtBot locked this on Aug 18, 2022

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-04-29 03:14 UTC

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