6 #ifndef BITCOIN_VALIDATIONINTERFACE_H 7 #define BITCOIN_VALIDATIONINTERFACE_H 39 std::shared_ptr<CValidationInterface> callbacks);
41 std::shared_ptr<CValidationInterface> callbacks);
86 ~CValidationInterface() =
default;
98 bool fInitialDownload) {}
183 const std::shared_ptr<const CBlock> &block){};
193 std::shared_ptr<CValidationInterface>);
197 std::function<
void()> func);
216 bool fInitialDownload);
226 const std::shared_ptr<const CBlock> &);
231 #endif // BITCOIN_VALIDATIONINTERFACE_H std::shared_ptr< const CTransaction > CTransactionRef
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)
std::unique_ptr< MainSignalsInstance > m_internals
virtual void ChainStateFlushed(const CBlockLocator &locator)
Notifies listeners of the new active block chain on-disk.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
virtual void BlockDisconnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
Notifies listeners of a block being disconnected.
void BlockDisconnected(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex)
virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr< const CBlock > &block)
Notifies listeners that a block which builds directly on our current tip has been received and connec...
size_t CallbacksPending()
void UnregisterSharedValidationInterface(std::shared_ptr< CValidationInterface > callbacks)
void UnregisterBackgroundSignalScheduler()
Unregister a CScheduler to give callbacks which should run in the background - these callbacks will n...
void TransactionRemovedFromMempool(const CTransactionRef &)
virtual void BlockChecked(const CBlock &, const BlockValidationState &)
Notifies listeners of a block validation result.
Implement this to subscribe to events generated in validation.
virtual void BlockConnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
Notifies listeners of a block being connected.
void RegisterSharedValidationInterface(std::shared_ptr< CValidationInterface > callbacks)
void RegisterValidationInterface(CValidationInterface *pwalletIn)
Register a wallet to receive updates from core.
void SyncWithValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main)
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
Notifies listeners when the block chain tip advances.
RecursiveMutex cs_main
Global state.
void CallFunctionInValidationInterfaceQueue(std::function< void()> func)
Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior...
void ChainStateFlushed(const CBlockLocator &)
CMainSignals & GetMainSignals()
void RegisterBackgroundSignalScheduler(CScheduler &scheduler)
Register a CScheduler to give callbacks which should run in the background (may only be called once) ...
#define LOCKS_EXCLUDED(...)
The block chain is a tree shaped structure starting with the genesis block at the root...
void FlushBackgroundCallbacks()
Call any remaining callbacks on the calling thread.
void UnregisterAllValidationInterfaces()
Unregister all wallets from core.
virtual void TransactionRemovedFromMempool(const CTransactionRef &ptx)
Notifies listeners of a transaction leaving mempool.
virtual void TransactionAddedToMempool(const CTransactionRef &ptxn)
Notifies listeners of a transaction having been added to mempool.
The MainSignalsInstance manages a list of shared_ptr<CValidationInterface> callbacks.
void NewPoWValidBlock(const CBlockIndex *, const std::shared_ptr< const CBlock > &)
void BlockChecked(const CBlock &, const BlockValidationState &)
void UnregisterValidationInterface(CValidationInterface *pwalletIn)
Unregister a wallet from core.
void BlockConnected(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex)
void TransactionAddedToMempool(const CTransactionRef &)