mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
fuzz: Drop unused version from fuzz input format
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <util/chaintype.h>
|
||||
#include <util/rbf.h>
|
||||
#include <validation.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
@@ -29,14 +28,7 @@ void initialize_transaction()
|
||||
|
||||
FUZZ_TARGET(transaction, .init = initialize_transaction)
|
||||
{
|
||||
CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
|
||||
try {
|
||||
int nVersion;
|
||||
ds >> nVersion;
|
||||
ds.SetVersion(nVersion);
|
||||
} catch (const std::ios_base::failure&) {
|
||||
return;
|
||||
}
|
||||
DataStream ds{buffer};
|
||||
bool valid_tx = true;
|
||||
const CTransaction tx = [&] {
|
||||
try {
|
||||
@@ -47,12 +39,9 @@ FUZZ_TARGET(transaction, .init = initialize_transaction)
|
||||
}
|
||||
}();
|
||||
bool valid_mutable_tx = true;
|
||||
CDataStream ds_mtx(buffer, SER_NETWORK, INIT_PROTO_VERSION);
|
||||
DataStream ds_mtx{buffer};
|
||||
CMutableTransaction mutable_tx;
|
||||
try {
|
||||
int nVersion;
|
||||
ds_mtx >> nVersion;
|
||||
ds_mtx.SetVersion(nVersion);
|
||||
ds_mtx >> TX_WITH_WITNESS(mutable_tx);
|
||||
} catch (const std::ios_base::failure&) {
|
||||
valid_mutable_tx = false;
|
||||
|
||||
Reference in New Issue
Block a user