Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 984 Lines • ▼ Show 20 Lines | void PeerLogicValidation::BlockConnected( | ||||
LOCK(g_cs_orphans); | LOCK(g_cs_orphans); | ||||
std::vector<uint256> vOrphanErase; | std::vector<uint256> vOrphanErase; | ||||
for (const CTransactionRef &ptx : pblock->vtx) { | for (const CTransactionRef &ptx : pblock->vtx) { | ||||
const CTransaction &tx = *ptx; | const CTransaction &tx = *ptx; | ||||
// Which orphan pool entries must we evict? | // Which orphan pool entries must we evict? | ||||
for (size_t j = 0; j < tx.vin.size(); j++) { | for (const auto &txin : tx.vin) { | ||||
auto itByPrev = mapOrphanTransactionsByPrev.find(tx.vin[j].prevout); | auto itByPrev = mapOrphanTransactionsByPrev.find(txin.prevout); | ||||
if (itByPrev == mapOrphanTransactionsByPrev.end()) { | if (itByPrev == mapOrphanTransactionsByPrev.end()) { | ||||
continue; | continue; | ||||
} | } | ||||
for (auto mi = itByPrev->second.begin(); | for (auto mi = itByPrev->second.begin(); | ||||
mi != itByPrev->second.end(); ++mi) { | mi != itByPrev->second.end(); ++mi) { | ||||
const CTransaction &orphanTx = *(*mi)->second.tx; | const CTransaction &orphanTx = *(*mi)->second.tx; | ||||
const uint256 &orphanHash = orphanTx.GetHash(); | const uint256 &orphanHash = orphanTx.GetHash(); | ||||
▲ Show 20 Lines • Show All 3,353 Lines • Show Last 20 Lines |