Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 999 Lines • ▼ Show 20 Lines | const CTransaction *CTxMemPool::GetConflictTx(const COutPoint &prevout) const { | ||||
return it == mapNextTx.end() ? nullptr : it->second; | return it == mapNextTx.end() ? nullptr : it->second; | ||||
} | } | ||||
std::optional<CTxMemPool::txiter> CTxMemPool::GetIter(const TxId &txid) const { | std::optional<CTxMemPool::txiter> CTxMemPool::GetIter(const TxId &txid) const { | ||||
auto it = mapTx.find(txid); | auto it = mapTx.find(txid); | ||||
if (it != mapTx.end()) { | if (it != mapTx.end()) { | ||||
return it; | return it; | ||||
} | } | ||||
return std::optional<txiter>{}; | return std::optional<txiter>{std::nullopt}; | ||||
} | } | ||||
CTxMemPool::setEntries | CTxMemPool::setEntries | ||||
CTxMemPool::GetIterSet(const std::set<TxId> &txids) const { | CTxMemPool::GetIterSet(const std::set<TxId> &txids) const { | ||||
CTxMemPool::setEntries ret; | CTxMemPool::setEntries ret; | ||||
for (const auto &txid : txids) { | for (const auto &txid : txids) { | ||||
const auto mi = GetIter(txid); | const auto mi = GetIter(txid); | ||||
if (mi) { | if (mi) { | ||||
▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines |