Bitcoin Core  29.1.0
P2P Digital Currency
ephemeral_policy.h
Go to the documentation of this file.
1 // Copyright (c) 2024-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 #ifndef BITCOIN_POLICY_EPHEMERAL_POLICY_H
6 #define BITCOIN_POLICY_EPHEMERAL_POLICY_H
7 
8 #include <consensus/amount.h>
9 #include <policy/packages.h>
10 #include <primitives/transaction.h>
11 
12 #include <optional>
13 
14 class CFeeRate;
15 class CTxMemPool;
16 class TxValidationState;
17 
42 /* All the following checks are only called if standardness rules are being applied. */
43 
48 bool PreCheckEphemeralTx(const CTransaction& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state);
49 
56 bool CheckEphemeralSpends(const Package& package, CFeeRate dust_relay_rate, const CTxMemPool& tx_pool, TxValidationState& out_child_state, Wtxid& out_child_wtxid);
57 
58 #endif // BITCOIN_POLICY_EPHEMERAL_POLICY_H
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
Definition: packages.h:50
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
bool PreCheckEphemeralTx(const CTransaction &tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState &state)
These utility functions ensure that ephemeral dust is safely created and spent without unduly risking...
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:303
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB.
Definition: feerate.h:32
bool CheckEphemeralSpends(const Package &package, CFeeRate dust_relay_rate, const CTxMemPool &tx_pool, TxValidationState &out_child_state, Wtxid &out_child_wtxid)
Must be called for each transaction(package) if any dust is in the package.
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:295
transaction_identifier represents the two canonical transaction identifier types (txid, wtxid).