Skip to content

Commit d9cfa5f

Browse files
committed
CheckEphemeralSpends: no need to iterate inputs if no parent dust
1 parent 87b26e3 commit d9cfa5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/policy/ephemeral_policy.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
7272
processed_parent_set.insert(parent_txid);
7373
}
7474

75+
if (unspent_parent_dust.empty()) {
76+
continue;
77+
}
78+
7579
// Now that we have gathered parents' dust, make sure it's spent
7680
// by the child
7781
for (const auto& tx_input : tx->vin) {

0 commit comments

Comments
 (0)