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:
parent
36f5effa17
commit
cbf1a47d60
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue