0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-04 13:55:23 -05:00

CheckEphemeralSpends: only compute txid of tx when needed

This commit is contained in:
Greg Sanders 2024-11-12 11:54:28 -05:00
parent 36f5effa17
commit cbf1a47d60

View file

@ -33,7 +33,6 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
}
for (const auto& tx : package) {
Txid txid = tx->GetHash();
std::unordered_set<Txid, SaltedTxidHasher> processed_parent_set;
std::unordered_set<COutPoint, SaltedOutpointHasher> unspent_parent_dust;
@ -70,7 +69,7 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
}
if (!unspent_parent_dust.empty()) {
return txid;
return tx->GetHash();
}
}