Changeset View
Changeset View
Standalone View
Standalone View
src/validationinterface.h
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | protected: | ||||
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, | virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, | ||||
const CBlockIndex *pindexFork, | const CBlockIndex *pindexFork, | ||||
bool fInitialDownload) {} | bool fInitialDownload) {} | ||||
/** | /** | ||||
* Notifies listeners of a transaction having been added to mempool. | * Notifies listeners of a transaction having been added to mempool. | ||||
* | * | ||||
* Called on a background thread. | * Called on a background thread. | ||||
*/ | */ | ||||
virtual void TransactionAddedToMempool(const CTransactionRef &tx) {} | virtual void TransactionAddedToMempool(const CTransactionRef &tx, | ||||
uint64_t mempool_sequence) {} | |||||
/** | /** | ||||
* Notifies listeners of a transaction leaving mempool. | * Notifies listeners of a transaction leaving mempool. | ||||
* | * | ||||
* This notification fires for transactions that are removed from the | * This notification fires for transactions that are removed from the | ||||
* mempool for the following reasons: | * mempool for the following reasons: | ||||
* | * | ||||
* - EXPIRY (expired from mempool after -mempoolexpiry hours) | * - EXPIRY (expired from mempool after -mempoolexpiry hours) | ||||
* - SIZELIMIT (removed in size limiting if the mempool exceeds -maxmempool | * - SIZELIMIT (removed in size limiting if the mempool exceeds -maxmempool | ||||
Show All 17 Lines | protected: | ||||
* - TransactionRemovedFromMempool(tx1 from block B) | * - TransactionRemovedFromMempool(tx1 from block B) | ||||
* - TransactionRemovedFromMempool(tx2 from block B) | * - TransactionRemovedFromMempool(tx2 from block B) | ||||
* - BlockConnected(A) | * - BlockConnected(A) | ||||
* - BlockConnected(B) | * - BlockConnected(B) | ||||
* | * | ||||
* Called on a background thread. | * Called on a background thread. | ||||
*/ | */ | ||||
virtual void TransactionRemovedFromMempool(const CTransactionRef &tx, | virtual void TransactionRemovedFromMempool(const CTransactionRef &tx, | ||||
MemPoolRemovalReason reason) {} | MemPoolRemovalReason reason, | ||||
uint64_t mempool_sequence) {} | |||||
/** | /** | ||||
* Notifies listeners of a block being connected. | * Notifies listeners of a block being connected. | ||||
* Provides a vector of transactions evicted from the mempool as a result. | * Provides a vector of transactions evicted from the mempool as a result. | ||||
* | * | ||||
* Called on a background thread. | * Called on a background thread. | ||||
*/ | */ | ||||
virtual void BlockConnected(const std::shared_ptr<const CBlock> &block, | virtual void BlockConnected(const std::shared_ptr<const CBlock> &block, | ||||
const CBlockIndex *pindex) {} | const CBlockIndex *pindex) {} | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | public: | ||||
void UnregisterBackgroundSignalScheduler(); | void UnregisterBackgroundSignalScheduler(); | ||||
/** Call any remaining callbacks on the calling thread */ | /** Call any remaining callbacks on the calling thread */ | ||||
void FlushBackgroundCallbacks(); | void FlushBackgroundCallbacks(); | ||||
size_t CallbacksPending(); | size_t CallbacksPending(); | ||||
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, | void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, | ||||
bool fInitialDownload); | bool fInitialDownload); | ||||
void TransactionAddedToMempool(const CTransactionRef &); | void TransactionAddedToMempool(const CTransactionRef &, | ||||
uint64_t mempool_sequence); | |||||
void TransactionRemovedFromMempool(const CTransactionRef &, | void TransactionRemovedFromMempool(const CTransactionRef &, | ||||
MemPoolRemovalReason); | MemPoolRemovalReason, | ||||
uint64_t mempool_sequence); | |||||
void BlockConnected(const std::shared_ptr<const CBlock> &, | void BlockConnected(const std::shared_ptr<const CBlock> &, | ||||
const CBlockIndex *pindex); | const CBlockIndex *pindex); | ||||
void BlockDisconnected(const std::shared_ptr<const CBlock> &, | void BlockDisconnected(const std::shared_ptr<const CBlock> &, | ||||
const CBlockIndex *pindex); | const CBlockIndex *pindex); | ||||
void ChainStateFlushed(const CBlockLocator &); | void ChainStateFlushed(const CBlockLocator &); | ||||
void BlockChecked(const CBlock &, const BlockValidationState &); | void BlockChecked(const CBlock &, const BlockValidationState &); | ||||
void NewPoWValidBlock(const CBlockIndex *, | void NewPoWValidBlock(const CBlockIndex *, | ||||
const std::shared_ptr<const CBlock> &); | const std::shared_ptr<const CBlock> &); | ||||
}; | }; | ||||
CMainSignals &GetMainSignals(); | CMainSignals &GetMainSignals(); | ||||
#endif // BITCOIN_VALIDATIONINTERFACE_H | #endif // BITCOIN_VALIDATIONINTERFACE_H |