Skip to content

Commit b8e98e8

Browse files
committed
fix(fuzz): remove invalid assertion in decode_tx harness
The decode_tx fuzz target asserted that DecodeHexTx() always fails, inherited from Bitcoin Core where random fuzz bytes essentially never produce valid transactions. With real Dash chain data as corpus input (e.g. AssetUnlockTx), valid transactions decode successfully, causing a false-positive crash. Remove the assertion to allow both success and failure paths to be exercised.
1 parent 01add0b commit b8e98e8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/test/fuzz/decode_tx.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ FUZZ_TARGET(decode_tx)
1616
{
1717
const std::string tx_hex = HexStr(std::string{buffer.begin(), buffer.end()});
1818
CMutableTransaction mtx;
19-
const bool result_none = DecodeHexTx(mtx, tx_hex);
20-
assert(!result_none);
19+
(void)DecodeHexTx(mtx, tx_hex);
2120
}

0 commit comments

Comments
 (0)