Changeset View
Changeset View
Standalone View
Standalone View
src/txorphanage.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < tx.vout.size(); i++) { | ||||
} | } | ||||
} | } | ||||
} | } | ||||
bool HaveOrphanTx(const TxId &txid) { | bool HaveOrphanTx(const TxId &txid) { | ||||
LOCK(g_cs_orphans); | LOCK(g_cs_orphans); | ||||
return mapOrphanTransactions.count(txid); | return mapOrphanTransactions.count(txid); | ||||
} | } | ||||
std::pair<CTransactionRef, NodeId> GetOrphanTx(const TxId &txid) { | |||||
AssertLockHeld(g_cs_orphans); | |||||
const auto it = mapOrphanTransactions.find(txid); | |||||
if (it == mapOrphanTransactions.end()) { | |||||
return {nullptr, -1}; | |||||
} | |||||
return {it->second.tx, it->second.fromPeer}; | |||||
} |