Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 552 Lines • ▼ Show 20 Lines | for (const CTxIn &txin : tx.vin) { | ||||
CCoinsView dummy; | CCoinsView dummy; | ||||
CCoinsViewCache view(&dummy); | CCoinsViewCache view(&dummy); | ||||
LockPoints lp; | LockPoints lp; | ||||
CCoinsViewMemPool viewMemPool(pcoinsTip.get(), pool); | CCoinsViewMemPool viewMemPool(pcoinsTip.get(), pool); | ||||
view.SetBackend(viewMemPool); | view.SetBackend(viewMemPool); | ||||
// Do all inputs exist? | // Do all inputs exist? | ||||
for (const CTxIn txin : tx.vin) { | for (const CTxIn &txin : tx.vin) { | ||||
if (!pcoinsTip->HaveCoinInCache(txin.prevout)) { | if (!pcoinsTip->HaveCoinInCache(txin.prevout)) { | ||||
coins_to_uncache.push_back(txin.prevout); | coins_to_uncache.push_back(txin.prevout); | ||||
} | } | ||||
if (!view.HaveCoin(txin.prevout)) { | if (!view.HaveCoin(txin.prevout)) { | ||||
// Are inputs missing because we already have the tx? | // Are inputs missing because we already have the tx? | ||||
for (size_t out = 0; out < tx.vout.size(); out++) { | for (size_t out = 0; out < tx.vout.size(); out++) { | ||||
// Optimistically just do efficient check of cache for | // Optimistically just do efficient check of cache for | ||||
▲ Show 20 Lines • Show All 5,096 Lines • Show Last 20 Lines |