 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
36 }
catch (
const std::ios_base::failure&) {
43 }
catch (
const std::ios_base::failure&) {
48 bool valid_mutable_tx =
true;
56 }
catch (
const std::ios_base::failure&) {
57 valid_mutable_tx =
false;
59 assert(valid_tx == valid_mutable_tx);
72 const bool is_standard_with_permit_bare_multisig =
IsStandardTx(tx,
true, dust_relay_fee, reason);
73 const bool is_standard_without_permit_bare_multisig =
IsStandardTx(tx,
false, dust_relay_fee, reason);
74 if (is_standard_without_permit_bare_multisig) {
75 assert(is_standard_with_permit_bare_multisig);
82 }
catch (
const std::runtime_error&) {
FUZZ_TARGET_INIT(transaction, initialize_transaction)
bool IsWitnessStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs)
Check if the transaction is over standard P2WSH resources limit: 3600bytes witnessScript size,...
bool IsStandardTx(const CTransaction &tx, bool permit_bare_multisig, const CFeeRate &dust_relay_fee, std::string &reason)
Check for standard transaction types.
bool CheckTransaction(const CTransaction &tx, TxValidationState &state)
bool AreInputsStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs)
Check transaction inputs to mitigate two potential denial-of-service attacks:
CAmount GetValueOut() const
unsigned int GetLegacySigOpCount(const CTransaction &tx)
Auxiliary functions for transaction validation (ideally should not be exposed)
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
Check if transaction is final and can be included in a block with the specified height and time.
#define Assert(val)
Identity function.
Fee rate in satoshis per kilobyte: CAmount / kB.
The basic transaction that is broadcasted on the network and contained in blocks.
Abstract view on the open txout dataset.
static size_t RecursiveDynamicUsage(const CScript &script)
static const std::string REGTEST
unsigned int GetTotalSize() const
Get the total transaction size in bytes, including witness data.
void SelectParams(const std::string &network)
Sets the params returned by Params() to those for the given chain name.
static const uint256 ZERO
std::string EncodeHexTx(const CTransaction &tx, const int serializeFlags=0)
std::string ToString() const
static int64_t GetTransactionWeight(const CTransaction &tx)
CCoinsView that adds a memory cache for transactions to another CCoinsView.
Double ended buffer combining vector and stream-like interfaces.
const uint256 & GetWitnessHash() const
static const unsigned int DUST_RELAY_TX_FEE
Min feerate for defining dust.
void TxToUniv(const CTransaction &tx, const uint256 &hashBlock, UniValue &entry, bool include_hex=true, int serialize_flags=0, const CTxUndo *txundo=nullptr, TxVerbosity verbosity=TxVerbosity::SHOW_DETAILS)
const uint256 & GetHash() const
A mutable version of CTransaction.
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost, unsigned int bytes_per_sigop)
Compute the virtual transaction size (weight reinterpreted as bytes).
constexpr deserialize_type deserialize
void initialize_transaction()
bool SignalsOptInRBF(const CTransaction &tx)
Check whether the sequence numbers on this transaction are signaling opt-in to replace-by-fee,...
static const int INIT_PROTO_VERSION
initial proto version, to be increased after version/verack negotiation