From d9cfa5fc4eb03fb425fd5d46d3b72db72fbc3243 Mon Sep 17 00:00:00 2001 From: Greg Sanders Date: Tue, 12 Nov 2024 13:26:34 -0500 Subject: [PATCH] CheckEphemeralSpends: no need to iterate inputs if no parent dust --- src/policy/ephemeral_policy.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/policy/ephemeral_policy.cpp b/src/policy/ephemeral_policy.cpp index 2d13a7e007b68..84863edd594e5 100644 --- a/src/policy/ephemeral_policy.cpp +++ b/src/policy/ephemeral_policy.cpp @@ -72,6 +72,10 @@ std::optional CheckEphemeralSpends(const Package& package, CFeeRate dust_r processed_parent_set.insert(parent_txid); } + if (unspent_parent_dust.empty()) { + continue; + } + // Now that we have gathered parents' dust, make sure it's spent // by the child for (const auto& tx_input : tx->vin) {