Bitcoin Core 28.99.0
P2P Digital Currency
tx_in.cpp
Go to the documentation of this file.
1// Copyright (c) 2019-2020 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
6#include <core_memusage.h>
7#include <policy/policy.h>
9#include <streams.h>
10#include <test/fuzz/fuzz.h>
11
12#include <cassert>
13
15{
16 DataStream ds{buffer};
17 CTxIn tx_in;
18 try {
19 ds >> tx_in;
20 } catch (const std::ios_base::failure&) {
21 return;
22 }
23
24 (void)GetTransactionInputWeight(tx_in);
26 (void)RecursiveDynamicUsage(tx_in);
27
28 (void)tx_in.ToString();
29}
An input of a transaction.
Definition: transaction.h:67
std::string ToString() const
Definition: transaction.cpp:40
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:147
static int64_t GetTransactionInputWeight(const CTxIn &txin)
Definition: validation.h:141
static size_t RecursiveDynamicUsage(const CScript &script)
Definition: core_memusage.h:12
int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCost, unsigned int bytes_per_sigop)
Definition: policy.cpp:322
FUZZ_TARGET(tx_in)
Definition: tx_in.cpp:14