Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
policy
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
41
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
amount.h
CAmount
int64_t CAmount
Amount in satoshis (Can be negative).
Definition
amount.h:12
CFeeRate
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
Definition
feerate.h:32
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition
transaction.h:281
CTxMemPool
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition
txmempool.h:187
TxValidationState
Definition
validation.h:125
CheckEphemeralSpends
bool CheckEphemeralSpends(const Package &package, CFeeRate dust_relay_rate, const CTxMemPool &tx_pool, TxValidationState &out_child_state, Wtxid &out_child_wtxid)
Called for each transaction(package) if any dust is in the package.
Definition
ephemeral_policy.cpp:33
PreCheckEphemeralTx
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...
Definition
ephemeral_policy.cpp:23
packages.h
Package
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
Definition
packages.h:45
transaction.h
Wtxid
transaction_identifier< true > Wtxid
Wtxid commits to all transaction fields including the witness.
Definition
transaction_identifier.h:73
Generated on
for Bitcoin Core by
1.17.0