Skip to content

Commit cbf1a47

Browse files
committed
CheckEphemeralSpends: only compute txid of tx when needed
1 parent 36f5eff commit cbf1a47

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/policy/ephemeral_policy.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
3333
}
3434

3535
for (const auto& tx : package) {
36-
Txid txid = tx->GetHash();
3736
std::unordered_set<Txid, SaltedTxidHasher> processed_parent_set;
3837
std::unordered_set<COutPoint, SaltedOutpointHasher> unspent_parent_dust;
3938

@@ -70,7 +69,7 @@ std::optional<Txid> CheckEphemeralSpends(const Package& package, CFeeRate dust_r
7069
}
7170

7271
if (!unspent_parent_dust.empty()) {
73-
return txid;
72+
return tx->GetHash();
7473
}
7574
}
7675

0 commit comments

Comments
 (0)