mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-02 11:41:18 +00:00
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
37 lines
996 B
C++
37 lines
996 B
C++
// Copyright (c) 2019-2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <consensus/validation.h>
|
|
#include <core_memusage.h>
|
|
#include <policy/feerate.h>
|
|
#include <policy/policy.h>
|
|
#include <primitives/transaction.h>
|
|
#include <streams.h>
|
|
#include <test/fuzz/fuzz.h>
|
|
#include <version.h>
|
|
|
|
FUZZ_TARGET(tx_out)
|
|
{
|
|
CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
|
|
CTxOut tx_out;
|
|
try {
|
|
int version;
|
|
ds >> version;
|
|
ds.SetVersion(version);
|
|
ds >> tx_out;
|
|
} catch (const std::ios_base::failure&) {
|
|
return;
|
|
}
|
|
|
|
const CFeeRate dust_relay_fee{DUST_RELAY_TX_FEE};
|
|
(void)GetDustThreshold(tx_out, dust_relay_fee);
|
|
(void)IsDust(tx_out, dust_relay_fee);
|
|
(void)RecursiveDynamicUsage(tx_out);
|
|
|
|
(void)tx_out.ToString();
|
|
(void)tx_out.IsNull();
|
|
tx_out.SetNull();
|
|
assert(tx_out.IsNull());
|
|
}
|