Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
tx_out.cpp
Go to the documentation of this file.
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
6#include <core_memusage.h>
7#include <policy/feerate.h>
8#include <policy/policy.h>
10#include <streams.h>
11#include <test/fuzz/fuzz.h>
12
14{
16 try {
17 SpanReader{buffer} >> tx_out;
18 } catch (const std::ios_base::failure&) {
19 return;
20 }
21
26
28 (void)tx_out.IsNull();
29 tx_out.SetNull();
30 assert(tx_out.IsNull());
31}
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
Definition feerate.h:32
std::string ToString(FeeRateFormat fee_rate_format=FeeRateFormat::BTC_KVB) const
Definition feerate.cpp:29
An output of a transaction.
Minimal stream for reading from an existing byte array by std::span.
Definition streams.h:83
static size_t RecursiveDynamicUsage(const CScript &script)
#define FUZZ_TARGET(...)
Definition fuzz.h:35
CAmount GetDustThreshold(const CTxOut &txout, const CFeeRate &dustRelayFeeIn)
Definition policy.cpp:26
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFeeIn)
Definition policy.cpp:65
static constexpr unsigned int DUST_RELAY_TX_FEE
Min feerate for defining dust.
Definition policy.h:67
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:73
assert(!tx.IsCoinBase())