mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-01 09:16:35 +00:00
CheckEphemeralSpends: only compute txid of tx when needed
This commit is contained in:
parent
36f5effa17
commit
cbf1a47d60
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user