Comparing two empty CChains is currently undefined behaviour, and resulted in false assertion failures when comparing identical empty CChains in local testing.
Let's just remove this comparison operator since it doesn't seem to be used anywhere.
Comparing two empty CChains is currently undefined behaviour, and resulted in false assertion failures when comparing identical empty CChains in local testing.
Let's just remove this comparison operator since it doesn't seem to be used anywhere.
Oh, nice catch! This code was introduced back in 2013 (see 4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5).
Fuzzing with the sanitizers would have trivially caught this one but it seems like we're missing fuzzing coverage for CChain::operator==: https://marcofalke.github.io/btc_cov/fuzz.coverage/src/chain.h.gcov.html
Will continue working on increasing fuzzing coverage as soon as the fuzzers that are currently under review have been processed (merged or rejected). If the review speed picks up a bit in src/test/fuzz/ I think we'll soon achieve fuzzing coverage on par with -- or exceeding -- the unit test coverage :) Review welcome! ❤️
ACK 2c0e6403b6cca1c1ed42a03c14912ad4a03f277f -- diff looks correct, but I prefer deleting broken unused functions instead of fixing them: deleting them removes the need to reason about the correctness of the fix entirely :)
If it's unused, just delete it.
It was unused, and had UB
ACK df536883d263781c2abe944afc85f681cda635ed -- patch is guaranteed to be correct :)
cr ACK df536883d263781c2abe944afc85f681cda635ed
I wonder why #19702 doesn't detect this