Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! CTxMemPool::FindScriptPubKey to search unconfirmed UTXOs
Browse files Browse the repository at this point in the history
luke-jr committed Mar 7, 2024
1 parent 7fd77c0 commit fab0462
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/txmempool.cpp
Original file line number Diff line number Diff line change
@@ -884,7 +884,8 @@ void CTxMemPool::FindScriptPubKey(const std::set<CScript>& needles, std::map<COu
for (const CTxMemPoolEntry& entry : mapTx) {
const CTransaction& tx = entry.GetTx();
const uint256& hash = tx.GetHash();
for (size_t txo_index = tx.vout.size(); txo_index-- > 0; ) {
for (size_t txo_index = tx.vout.size(); txo_index > 0; ) {
--txo_index;
const CTxOut& txo = tx.vout[txo_index];
if (needles.count(txo.scriptPubKey)) {
out_results.emplace(COutPoint(hash, txo_index), Coin(txo, MEMPOOL_HEIGHT, false));

0 comments on commit fab0462

Please sign in to comment.