Changeset View
Changeset View
Standalone View
Standalone View
src/txorphanage.cpp
Show All 18 Lines | |||||
std::map<COutPoint, | std::map<COutPoint, | ||||
std::set<std::map<TxId, COrphanTx>::iterator, IteratorComparator>> | std::set<std::map<TxId, COrphanTx>::iterator, IteratorComparator>> | ||||
mapOrphanTransactionsByPrev GUARDED_BY(g_cs_orphans); | mapOrphanTransactionsByPrev GUARDED_BY(g_cs_orphans); | ||||
std::vector<std::map<TxId, COrphanTx>::iterator> | std::vector<std::map<TxId, COrphanTx>::iterator> | ||||
g_orphan_list GUARDED_BY(g_cs_orphans); | g_orphan_list GUARDED_BY(g_cs_orphans); | ||||
int EraseOrphanTx(TxId id) { | int EraseOrphanTx(const TxId &txid) { | ||||
std::map<TxId, COrphanTx>::iterator it = mapOrphanTransactions.find(id); | std::map<TxId, COrphanTx>::iterator it = mapOrphanTransactions.find(txid); | ||||
if (it == mapOrphanTransactions.end()) { | if (it == mapOrphanTransactions.end()) { | ||||
return 0; | return 0; | ||||
} | } | ||||
for (const CTxIn &txin : it->second.tx->vin) { | for (const CTxIn &txin : it->second.tx->vin) { | ||||
auto itPrev = mapOrphanTransactionsByPrev.find(txin.prevout); | auto itPrev = mapOrphanTransactionsByPrev.find(txin.prevout); | ||||
if (itPrev == mapOrphanTransactionsByPrev.end()) { | if (itPrev == mapOrphanTransactionsByPrev.end()) { | ||||
continue; | continue; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |