bitcoinfuzz
bitcoinfuzz copied to clipboard
Return block hash on `block_deserialization` success
Instead of just returning std::optional<bool>, block_deserialization functions could return the block hash. This would allow us to compare hashes for successful deserialization and extend fuzzing to cover hash validation.
Proposed behavior:
- Failed blocks return
falseor0. - Cases that currently return null in
std::optional<bool>return an empty string. - Successful deserialization returns the block hash
I think this is a good idea and it's what we were doing on bitcoinfuzz v1 (see https://github.com/brunoerg/bitcoinfuzz/blob/main/btcd_lib/wrapper.go#L21)
I've opened a PR to fix this: #222