Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 792 Lines • ▼ Show 20 Lines | public: | ||||
void RemoveUnbroadcastTx(const TxId &txid, const bool unchecked = false); | void RemoveUnbroadcastTx(const TxId &txid, const bool unchecked = false); | ||||
/** Returns transactions in unbroadcast set */ | /** Returns transactions in unbroadcast set */ | ||||
const std::set<TxId> GetUnbroadcastTxs() const { | const std::set<TxId> GetUnbroadcastTxs() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return m_unbroadcast_txids; | return m_unbroadcast_txids; | ||||
} | } | ||||
// Returns if a txid is in the unbroadcast set | |||||
bool IsUnbroadcastTx(const TxId &txid) const { | |||||
LOCK(cs); | |||||
return (m_unbroadcast_txids.count(txid) != 0); | |||||
} | |||||
private: | private: | ||||
/** | /** | ||||
* UpdateForDescendants is used by UpdateTransactionsFromBlock to update the | * UpdateForDescendants is used by UpdateTransactionsFromBlock to update the | ||||
* descendants for a single transaction that has been added to the mempool | * descendants for a single transaction that has been added to the mempool | ||||
* but may have child transactions in the mempool, eg during a chain reorg. | * but may have child transactions in the mempool, eg during a chain reorg. | ||||
* setExclude is the set of descendant transactions in the mempool that must | * setExclude is the set of descendant transactions in the mempool that must | ||||
* not be accounted for (because any descendants in setExclude were added to | * not be accounted for (because any descendants in setExclude were added to | ||||
* the mempool after the transaction being updated and hence their state is | * the mempool after the transaction being updated and hence their state is | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |