7 #ifndef PIVX_VALIDATIONINTERFACE_H
8 #define PIVX_VALIDATIONINTERFACE_H
148 virtual void BlockDisconnected(
const std::shared_ptr<const CBlock> &block,
const uint256& blockHash,
int nBlockHeight, int64_t blockTime) {}
190 void BlockDisconnected(
const std::shared_ptr<const CBlock> &block,
const uint256& blockHash,
int nBlockHeight, int64_t blockTime);
The block chain is a tree shaped structure starting with the genesis block at the root,...
size_t CallbacksPending()
std::unique_ptr< MainSignalsInstance > m_internals
void SetBestChain(const CBlockLocator &)
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)
void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
void UnregisterBackgroundSignalScheduler()
Unregister a CScheduler to give callbacks which should run in the background - these callbacks will n...
void AcceptedBlockHeader(const CBlockIndex *pindexNew)
void Broadcast(CConnman *connman)
void BlockChecked(const CBlock &, const CValidationState &)
void RegisterBackgroundSignalScheduler(CScheduler &scheduler)
Register a CScheduler to give callbacks which should run in the background (may only be called once)
void BlockDisconnected(const std::shared_ptr< const CBlock > &block, const uint256 &blockHash, int nBlockHeight, int64_t blockTime)
void TransactionAddedToMempool(const CTransactionRef &ptxn)
void BlockConnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
void FlushBackgroundCallbacks()
Call any remaining callbacks on the calling thread.
void TransactionRemovedFromMempool(const CTransactionRef &, MemPoolRemovalReason)
Implement this to subscribe to events generated in validation.
virtual void BlockDisconnected(const std::shared_ptr< const CBlock > &block, const uint256 &blockHash, int nBlockHeight, int64_t blockTime)
Notifies listeners of a block being disconnected.
virtual void ResendWalletTransactions(CConnman *connman)
Tells listeners to broadcast their data.
virtual ~CValidationInterface()=default
virtual void TransactionAddedToMempool(const CTransactionRef &ptxn)
Notifies listeners of a transaction having been added to mempool.
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
Notifies listeners when the block chain tip advances.
virtual void TransactionRemovedFromMempool(const CTransactionRef &ptx, MemPoolRemovalReason reason)
Notifies listeners of a transaction leaving mempool.
virtual void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
Notifies listeners of updated deterministic masternode list.
virtual void SetBestChain(const CBlockLocator &locator)
Notifies listeners of the new active block chain on-disk.
virtual void BlockConnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
Notifies listeners of a block being connected.
virtual void AcceptedBlockHeader(const CBlockIndex *pindexNew)
virtual void BlockChecked(const CBlock &, const CValidationState &)
Capture information about block/transaction validation.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
std::shared_ptr< const CTransaction > CTransactionRef
MemPoolRemovalReason
Reason why a transaction was removed from the mempool, this is passed to the notification signal.
CMainSignals & GetMainSignals()
void CallFunctionInValidationInterfaceQueue(std::function< void()> func)
Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior...
void UnregisterValidationInterface(CValidationInterface *pwalletIn)
Unregister a wallet from core.
void RegisterSharedValidationInterface(std::shared_ptr< CValidationInterface > pwalletIn)
void UnregisterAllValidationInterfaces()
Unregister all wallets from core.
void UnregisterSharedValidationInterface(std::shared_ptr< CValidationInterface > pwalletIn)
void RegisterValidationInterface(CValidationInterface *pwalletIn)
Register a wallet to receive updates from core.
void SyncWithValidationInterfaceQueue()
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...