Bitcoin Core 29.99.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>
11
12#include <optional>
13
14class CFeeRate;
15class CTxMemPool;
17
42/* All the following checks are only called if standardness rules are being applied. */
43
48bool PreCheckEphemeralTx(const CTransaction& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state);
49
56bool 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
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB.
Definition: feerate.h:33
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:296
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:304
transaction_identifier represents the two canonical transaction identifier types (txid,...
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.
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...
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
Definition: packages.h:50