fuzz: Remove unused `DeserializeFromFuzzingInput` params overload #35679

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260707-fuzz-unused changing 1 files +0 −11
  1. hebasto commented at 3:56 PM on July 7, 2026: member

    No description provided.

  2. fuzz: Remove unused `DeserializeFromFuzzingInput` params overload 8c0c5a0e23
  3. DrahtBot added the label Fuzzing on Jul 7, 2026
  4. DrahtBot commented at 3:56 PM on July 7, 2026: 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/35679.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK pablomartin4btc, l0rinc, brunoerg

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. pablomartin4btc commented at 6:10 PM on July 7, 2026: member

    ACK 8c0c5a0e23314d5918447e43a80c12f7f0720392

    It was originally added in https://github.com/bitcoin/bitcoin/commit/fac81affb527132945773a5315bd27fec61ec52f but I couldn't find it ever being called.

  6. l0rinc approved
  7. l0rinc commented at 6:11 PM on July 7, 2026: contributor

    ACK 8c0c5a0e23314d5918447e43a80c12f7f0720392

    It seems only the two-param DeserializeFromFuzzingInput overload is ever used.

  8. maflcko commented at 6:28 PM on July 7, 2026: member

    Hmm, looks like this is unused since I added it in commit fac81affb52?

    In any case, removing makes sense, because ser-params should just be embedded into the object itself, not passed as a separate param.

    This works here, because only Serialize is called and that doesn't need to construct a new object. If you want, you can remove Serialize with separate ser-param param completely:

    diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp
    index 8e8ab53e38..152b0156d6 100644
    --- a/src/test/fuzz/deserialize.cpp
    +++ b/src/test/fuzz/deserialize.cpp
    @@ -59,10 +59,2 @@ struct invalid_fuzzing_input_exception : public std::exception {
     
    -template <typename T, typename P>
    -DataStream Serialize(const T& obj, const P& params)
    -{
    -    DataStream ds{};
    -    ds << params(obj);
    -    return ds;
    -}
    -
     template <typename T, typename P>
    @@ -129,3 +121,3 @@ void AssertEqualAfterSerializeDeserialize(const T& obj, const P& params)
     {
    -    assert(Deserialize<T>(Serialize(obj, params), params) == obj);
    +    assert(Deserialize<T>(Serialize(params(obj)), params) == obj);
     }
    
  9. brunoerg approved
  10. brunoerg commented at 1:26 PM on July 8, 2026: contributor

    code review ACK 8c0c5a0e23314d5918447e43a80c12f7f0720392


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-07-09 06:47 UTC