diff --git a/src/policy/ephemeral_policy.cpp b/src/policy/ephemeral_policy.cpp index e0b96d32bb6c9..eadc1d24752ef 100644 --- a/src/policy/ephemeral_policy.cpp +++ b/src/policy/ephemeral_policy.cpp @@ -10,7 +10,7 @@ bool HasDust(const CTransactionRef& tx, CFeeRate dust_relay_rate) return std::any_of(tx->vout.cbegin(), tx->vout.cend(), [&](const auto& output) { return IsDust(output, dust_relay_rate); }); } -bool CheckValidEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state) +bool PreCheckEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state) { // We never want to give incentives to mine this transaction alone if ((base_fee != 0 || mod_fee != 0) && HasDust(tx, dust_relay_rate)) { diff --git a/src/policy/ephemeral_policy.h b/src/policy/ephemeral_policy.h index 26140f9a020b9..65dbab48e2525 100644 --- a/src/policy/ephemeral_policy.h +++ b/src/policy/ephemeral_policy.h @@ -15,7 +15,7 @@ * set. * This is ensured by requiring: - * - CheckValidEphemeralTx checks are respected + * - PreCheckEphemeralTx checks are respected * - The parent has no child (and 0-fee as implied above to disincentivize mining) * - OR the parent transaction has exactly one child, and the dust is spent by that child * @@ -43,7 +43,7 @@ bool HasDust(const CTransactionRef& tx, CFeeRate dust_relay_rate); * Does context-less checks about a single transaction. * Returns false if the fee is non-zero and dust exists, populating state. True otherwise. */ -bool CheckValidEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state); +bool PreCheckEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state); /** Must be called for each transaction(package) if any dust is in the package. * Checks that each transaction's parents have their dust spent by the child, diff --git a/src/validation.cpp b/src/validation.cpp index 62cae2cfb5046..1510200abf073 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -915,8 +915,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) // Enforces 0-fee for dust transactions, no incentive to be mined alone if (m_pool.m_opts.require_standard) { - if (!CheckValidEphemeralTx(ptx, m_pool.m_opts.dust_relay_feerate, ws.m_base_fees, ws.m_modified_fees, state)) { - return false; // state filled in by CheckValidEphemeralTx + if (!PreCheckEphemeralTx(ptx, m_pool.m_opts.dust_relay_feerate, ws.m_base_fees, ws.m_modified_fees, state)) { + return false; // state filled in by PreCheckEphemeralTx } }