MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / pruneSpent

Method pruneSpent

src/txmempool.cpp:372–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void CTxMemPool::pruneSpent(const uint256 &hashTx, CCoins &coins)
373{
374 LOCK(cs);
375
376 std::map<COutPoint, CInPoint>::iterator it = mapNextTx.lower_bound(COutPoint(hashTx, 0));
377
378 // iterate over all COutPoints in mapNextTx whose hash equals the provided hashTx
379 while (it != mapNextTx.end() && it->first.hash == hashTx) {
380 coins.Spend(it->first.n); // and remove those outputs from coins
381 it++;
382 }
383}
384
385unsigned int CTxMemPool::GetTransactionsUpdated() const
386{

Callers 3

gettxoutFunction · 0.80
rest_getutxosFunction · 0.80
ProcessGetUTXOsFunction · 0.80

Calls 3

SpendMethod · 0.80
COutPointClass · 0.70
endMethod · 0.45

Tested by

no test coverage detected