Branch data Line data Source code
1 : : // Copyright (c) 2019-present The Bitcoin Core developers
2 : : // Distributed under the MIT software license, see the accompanying
3 : : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 : :
5 : : #include <consensus/validation.h>
6 : : #include <core_memusage.h>
7 : : #include <policy/policy.h>
8 : : #include <primitives/transaction.h>
9 : : #include <streams.h>
10 : : #include <test/fuzz/fuzz.h>
11 : :
12 : : #include <cassert>
13 : :
14 [ + - ]: 608 : FUZZ_TARGET(tx_in)
15 : : {
16 : 154 : CTxIn tx_in;
17 : 154 : try {
18 [ + + ]: 154 : SpanReader{buffer} >> tx_in;
19 [ - + ]: 43 : } catch (const std::ios_base::failure&) {
20 : 43 : return;
21 : 43 : }
22 : :
23 : 111 : (void)GetTransactionInputWeight(tx_in);
24 [ + - ]: 111 : (void)GetVirtualTransactionInputSize(tx_in);
25 : 111 : (void)RecursiveDynamicUsage(tx_in);
26 : :
27 [ + - ]: 222 : (void)tx_in.ToString();
28 : 154 : }
|