mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 12:03:04 +02:00
fuzz: CDataStream -> DataStream in script_flags
This commit is contained in:
@@ -7,21 +7,12 @@
|
|||||||
#include <script/interpreter.h>
|
#include <script/interpreter.h>
|
||||||
#include <streams.h>
|
#include <streams.h>
|
||||||
#include <test/util/script.h>
|
#include <test/util/script.h>
|
||||||
#include <version.h>
|
|
||||||
|
|
||||||
#include <test/fuzz/fuzz.h>
|
#include <test/fuzz/fuzz.h>
|
||||||
|
|
||||||
FUZZ_TARGET(script_flags)
|
FUZZ_TARGET(script_flags)
|
||||||
{
|
{
|
||||||
CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
|
DataStream ds{buffer};
|
||||||
try {
|
|
||||||
int nVersion;
|
|
||||||
ds >> nVersion;
|
|
||||||
ds.SetVersion(nVersion);
|
|
||||||
} catch (const std::ios_base::failure&) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const CTransaction tx(deserialize, TX_WITH_WITNESS, ds);
|
const CTransaction tx(deserialize, TX_WITH_WITNESS, ds);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user