CheckEphemeralSpends: only compute txid of tx when needed
This commit is contained in:
1 parent
36f5effa17
commit
cbf1a47d60
1 file changed
+1
-2
@@ -33,7 +33,6 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& tx : package) {
|
for (const auto& tx : package) {
|
||||||
Txid txid = tx->GetHash();
|
|
||||||
std::unordered_set<Txid, SaltedTxidHasher> processed_parent_set;
|
std::unordered_set<Txid, SaltedTxidHasher> processed_parent_set;
|
||||||
std::unordered_set<COutPoint, SaltedOutpointHasher> unspent_parent_dust;
|
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()) {
|
if (!unspent_parent_dust.empty()) {
|
||||||
return txid;
|
return tx->GetHash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user