mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 08:24:21 +01:00
CheckEphemeralSpends: only compute txid of tx when needed
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user