19#include <unordered_set>
35 if (!
Assume(std::ranges::all_of(
package, [](
const auto& tx){
return tx !=
nullptr;}))) {
41 for (
const auto& tx :
package) {
45 for (
const auto& tx :
package) {
49 for (
const auto&
tx_input : tx->vin) {
81 for (
const auto&
tx_input : tx->vin) {
int64_t CAmount
Amount in satoshis (Can be negative)
#define Assume(val)
Assume is the identity function.
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac.
An outpoint - a combination of a transaction hash and an index n into its vout.
The basic transaction that is broadcasted on the network and contained in blocks.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
transaction_identifier represents the two canonical transaction identifier types (txid,...
@ TX_MEMPOOL_POLICY
violated mempool's fee/size/descendant/RBF/etc limits
@ TX_NOT_STANDARD
otherwise didn't meet our local policy rules
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.
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.
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFeeIn)
std::vector< uint32_t > GetDust(const CTransaction &tx, CFeeRate dust_relay_rate)
Get the vout index numbers of all dust outputs.
std::shared_ptr< const CTransaction > CTransactionRef
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.