Skip to content

Commit 04a614b

Browse files
committed
Rename CheckValidEphemeralTx to PreCheckEphemeralTx
1 parent cbf1a47 commit 04a614b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/policy/ephemeral_policy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ bool HasDust(const CTransactionRef& tx, CFeeRate dust_relay_rate)
1010
return std::any_of(tx->vout.cbegin(), tx->vout.cend(), [&](const auto& output) { return IsDust(output, dust_relay_rate); });
1111
}
1212

13-
bool CheckValidEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state)
13+
bool PreCheckEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state)
1414
{
1515
// We never want to give incentives to mine this transaction alone
1616
if ((base_fee != 0 || mod_fee != 0) && HasDust(tx, dust_relay_rate)) {

src/policy/ephemeral_policy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* set.
1616
1717
* This is ensured by requiring:
18-
* - CheckValidEphemeralTx checks are respected
18+
* - PreCheckEphemeralTx checks are respected
1919
* - The parent has no child (and 0-fee as implied above to disincentivize mining)
2020
* - OR the parent transaction has exactly one child, and the dust is spent by that child
2121
*
@@ -43,7 +43,7 @@ bool HasDust(const CTransactionRef& tx, CFeeRate dust_relay_rate);
4343
* Does context-less checks about a single transaction.
4444
* Returns false if the fee is non-zero and dust exists, populating state. True otherwise.
4545
*/
46-
bool CheckValidEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state);
46+
bool PreCheckEphemeralTx(const CTransactionRef& tx, CFeeRate dust_relay_rate, CAmount base_fee, CAmount mod_fee, TxValidationState& state);
4747

4848
/** Must be called for each transaction(package) if any dust is in the package.
4949
* Checks that each transaction's parents have their dust spent by the child,

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
915915

916916
// Enforces 0-fee for dust transactions, no incentive to be mined alone
917917
if (m_pool.m_opts.require_standard) {
918-
if (!CheckValidEphemeralTx(ptx, m_pool.m_opts.dust_relay_feerate, ws.m_base_fees, ws.m_modified_fees, state)) {
919-
return false; // state filled in by CheckValidEphemeralTx
918+
if (!PreCheckEphemeralTx(ptx, m_pool.m_opts.dust_relay_feerate, ws.m_base_fees, ws.m_modified_fees, state)) {
919+
return false; // state filled in by PreCheckEphemeralTx
920920
}
921921
}
922922

0 commit comments

Comments
 (0)