Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
validationinterface.cpp
Go to the documentation of this file.
23 boost::signals2::signal<void (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> UpdatedBlockTip;
24 boost::signals2::signal<void (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> SynchronousUpdatedBlockTip;
26 boost::signals2::signal<void (const std::shared_ptr<const CBlock> &, const CBlockIndex *pindex, const std::vector<CTransactionRef>&)> BlockConnected;
27 boost::signals2::signal<void (const std::shared_ptr<const CBlock> &, const CBlockIndex* pindexDisconnected)> BlockDisconnected;
32 boost::signals2::signal<void (const CBlockIndex *, const std::shared_ptr<const CBlock>&)> NewPoWValidBlock;
35 boost::signals2::signal<void (const CTransaction &tx, const llmq::CInstantSendLock& islock)>NotifyTransactionLock;
36 boost::signals2::signal<void (const CBlockIndex* pindex, const llmq::CChainLockSig& clsig)>NotifyChainLock;
39 boost::signals2::signal<void (const CTransaction ¤tTx, const CTransaction &previousTx)>NotifyInstantSendDoubleSpendAttempt;
40 boost::signals2::signal<void (bool undo, const CDeterministicMNList& oldMNList, const CDeterministicMNListDiff& diff)>NotifyMasternodeListChanged;
76 pool.NotifyEntryRemoved.disconnect(boost::bind(&CMainSignals::MempoolEntryRemoved, this, _1, _2));
85 g_signals.m_internals->AcceptedBlockHeader.connect(boost::bind(&CValidationInterface::AcceptedBlockHeader, pwalletIn, _1));
86 g_signals.m_internals->NotifyHeaderTip.connect(boost::bind(&CValidationInterface::NotifyHeaderTip, pwalletIn, _1, _2));
87 g_signals.m_internals->UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
88 g_signals.m_internals->SynchronousUpdatedBlockTip.connect(boost::bind(&CValidationInterface::SynchronousUpdatedBlockTip, pwalletIn, _1, _2, _3));
89 g_signals.m_internals->TransactionAddedToMempool.connect(boost::bind(&CValidationInterface::TransactionAddedToMempool, pwalletIn, _1, _2));
90 g_signals.m_internals->BlockConnected.connect(boost::bind(&CValidationInterface::BlockConnected, pwalletIn, _1, _2, _3));
91 g_signals.m_internals->BlockDisconnected.connect(boost::bind(&CValidationInterface::BlockDisconnected, pwalletIn, _1, _2));
92 g_signals.m_internals->NotifyTransactionLock.connect(boost::bind(&CValidationInterface::NotifyTransactionLock, pwalletIn, _1, _2));
93 g_signals.m_internals->NotifyChainLock.connect(boost::bind(&CValidationInterface::NotifyChainLock, pwalletIn, _1, _2));
94 g_signals.m_internals->TransactionRemovedFromMempool.connect(boost::bind(&CValidationInterface::TransactionRemovedFromMempool, pwalletIn, _1));
95 g_signals.m_internals->SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
96 g_signals.m_internals->Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
97 g_signals.m_internals->BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
98 g_signals.m_internals->NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
99 g_signals.m_internals->NotifyGovernanceObject.connect(boost::bind(&CValidationInterface::NotifyGovernanceObject, pwalletIn, _1));
100 g_signals.m_internals->NotifyGovernanceVote.connect(boost::bind(&CValidationInterface::NotifyGovernanceVote, pwalletIn, _1));
101 g_signals.m_internals->NotifyInstantSendDoubleSpendAttempt.connect(boost::bind(&CValidationInterface::NotifyInstantSendDoubleSpendAttempt, pwalletIn, _1, _2));
102 g_signals.m_internals->NotifyMasternodeListChanged.connect(boost::bind(&CValidationInterface::NotifyMasternodeListChanged, pwalletIn, _1, _2, _3));
106 g_signals.m_internals->BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
107 g_signals.m_internals->Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1, _2));
108 g_signals.m_internals->SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
109 g_signals.m_internals->NotifyChainLock.disconnect(boost::bind(&CValidationInterface::NotifyChainLock, pwalletIn, _1, _2));
110 g_signals.m_internals->NotifyTransactionLock.disconnect(boost::bind(&CValidationInterface::NotifyTransactionLock, pwalletIn, _1, _2));
111 g_signals.m_internals->TransactionAddedToMempool.disconnect(boost::bind(&CValidationInterface::TransactionAddedToMempool, pwalletIn, _1, _2));
112 g_signals.m_internals->BlockConnected.disconnect(boost::bind(&CValidationInterface::BlockConnected, pwalletIn, _1, _2, _3));
113 g_signals.m_internals->BlockDisconnected.disconnect(boost::bind(&CValidationInterface::BlockDisconnected, pwalletIn, _1, _2));
114 g_signals.m_internals->TransactionRemovedFromMempool.disconnect(boost::bind(&CValidationInterface::TransactionRemovedFromMempool, pwalletIn, _1));
115 g_signals.m_internals->UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
116 g_signals.m_internals->SynchronousUpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::SynchronousUpdatedBlockTip, pwalletIn, _1, _2, _3));
117 g_signals.m_internals->NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
118 g_signals.m_internals->NotifyHeaderTip.disconnect(boost::bind(&CValidationInterface::NotifyHeaderTip, pwalletIn, _1, _2));
119 g_signals.m_internals->AcceptedBlockHeader.disconnect(boost::bind(&CValidationInterface::AcceptedBlockHeader, pwalletIn, _1));
120 g_signals.m_internals->NotifyGovernanceObject.disconnect(boost::bind(&CValidationInterface::NotifyGovernanceObject, pwalletIn, _1));
121 g_signals.m_internals->NotifyGovernanceVote.disconnect(boost::bind(&CValidationInterface::NotifyGovernanceVote, pwalletIn, _1));
122 g_signals.m_internals->NotifyInstantSendDoubleSpendAttempt.disconnect(boost::bind(&CValidationInterface::NotifyInstantSendDoubleSpendAttempt, pwalletIn, _1, _2));
123 g_signals.m_internals->NotifyMasternodeListChanged.disconnect(boost::bind(&CValidationInterface::NotifyMasternodeListChanged, pwalletIn, _1, _2, _3));
172 void CMainSignals::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
173 m_internals->m_schedulerClient.AddToProcessQueue([pindexNew, pindexFork, fInitialDownload, this] {
178 void CMainSignals::SynchronousUpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
188 void CMainSignals::BlockConnected(const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex, const std::shared_ptr<const std::vector<CTransactionRef>>& pvtxConflicted) {
194 void CMainSignals::BlockDisconnected(const std::shared_ptr<const CBlock> &pblock, const CBlockIndex* pindexDisconnected) {
214 void CMainSignals::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock> &block) {
226 void CMainSignals::NotifyTransactionLock(const CTransaction &tx, const llmq::CInstantSendLock& islock) {
230 void CMainSignals::NotifyChainLock(const CBlockIndex* pindex, const llmq::CChainLockSig& clsig) {
242 void CMainSignals::NotifyInstantSendDoubleSpendAttempt(const CTransaction ¤tTx, const CTransaction &previousTx) {
246 void CMainSignals::NotifyMasternodeListChanged(bool undo, const CDeterministicMNList& oldMNList, const CDeterministicMNListDiff& diff) {
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)
Definition: validationinterface.cpp:172
Class used by CScheduler clients which may schedule multiple jobs which are required to be run serial...
Definition: scheduler.h:93
std::unique_ptr< MainSignalsInstance > m_internals
Definition: validationinterface.h:141
void SyncWithValidationInterfaceQueue()
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...
Definition: validationinterface.cpp:154
virtual void BlockChecked(const CBlock &, const CValidationState &)
Notifies listeners of a block validation result.
Definition: validationinterface.h:128
virtual void TransactionAddedToMempool(const CTransactionRef &ptxn, int64_t nAcceptTime)
Notifies listeners of a transaction having been added to mempool.
Definition: validationinterface.h:83
virtual void AcceptedBlockHeader(const CBlockIndex *pindexNew)
Definition: validationinterface.h:66
virtual void NotifyGovernanceVote(const CGovernanceVote &vote)
Definition: validationinterface.h:110
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
Definition: block.h:127
Definition: deterministicmns.h:547
void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload)
Definition: validationinterface.cpp:222
void SynchronousUpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)
Definition: validationinterface.cpp:178
void BlockDisconnected(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindexDisconnected)
Definition: validationinterface.cpp:194
boost::signals2::signal< void(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex, const std::vector< CTransactionRef > &)> BlockConnected
Definition: validationinterface.cpp:26
Definition: block.h:72
Definition: governance-vote.h:54
void NotifyGovernanceVote(const CGovernanceVote &vote)
Definition: validationinterface.cpp:234
void TransactionAddedToMempool(const CTransactionRef &, int64_t)
Definition: validationinterface.cpp:182
virtual void ResendWalletTransactions(int64_t nBestBlockTime, CConnman *connman)
Tells listeners to broadcast their data.
Definition: validationinterface.h:121
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...
Definition: validationinterface.h:132
boost::signals2::signal< void(const CBlock &, const CValidationState &)> BlockChecked
Definition: validationinterface.cpp:31
void UnregisterBackgroundSignalScheduler()
Unregister a CScheduler to give callbacks which should run in the background - these callbacks will n...
Definition: validationinterface.cpp:56
void NotifyChainLock(const CBlockIndex *pindex, const llmq::CChainLockSig &clsig)
Definition: validationinterface.cpp:230
boost::signals2::signal< void(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindexDisconnected)> BlockDisconnected
Definition: validationinterface.cpp:27
boost::signals2::signal< void(const CTransactionRef &, int64_t)> TransactionAddedToMempool
Definition: validationinterface.cpp:25
virtual void SetBestChain(const CBlockLocator &locator)
Notifies listeners of the new active block chain on-disk.
Definition: validationinterface.h:119
MemPoolRemovalReason
Reason why a transaction was removed from the mempool, this is passed to the notification signal...
Definition: txmempool.h:349
void UnregisterAllValidationInterfaces()
Unregister all wallets from core.
Definition: validationinterface.cpp:126
void UnregisterValidationInterface(CValidationInterface *pwalletIn)
Unregister a wallet from core.
Definition: validationinterface.cpp:105
void Broadcast(int64_t nBestBlockTime, CConnman *connman)
Definition: validationinterface.cpp:206
void BlockChecked(const CBlock &, const CValidationState &)
Definition: validationinterface.cpp:210
void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
Definition: validationinterface.cpp:246
Definition: validationinterface.h:64
void NotifyGovernanceObject(const CGovernanceObject &object)
Definition: validationinterface.cpp:238
virtual void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload)
Definition: validationinterface.h:67
Definition: quorums_instantsend.h:20
virtual void NotifyChainLock(const CBlockIndex *pindex, const llmq::CChainLockSig &clsig)
Definition: validationinterface.h:109
boost::signals2::signal< void(const CBlockLocator &)> SetBestChain
Definition: validationinterface.cpp:29
Definition: deterministicmns.h:288
Removed for block.
virtual void NotifyInstantSendDoubleSpendAttempt(const CTransaction ¤tTx, const CTransaction &previousTx)
Definition: validationinterface.h:112
Removed for reorganization.
SingleThreadedSchedulerClient m_schedulerClient
Definition: validationinterface.cpp:44
MainSignalsInstance(CScheduler *pscheduler)
Definition: validationinterface.cpp:46
boost::signals2::signal< void(const CBlockIndex *, const std::shared_ptr< const CBlock > &)> NewPoWValidBlock
Definition: validationinterface.cpp:32
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
Notifies listeners of updated block chain tip.
Definition: validationinterface.h:73
void RegisterWithMempoolSignals(CTxMemPool &pool)
Register with mempool to call TransactionRemovedFromMempool callbacks.
Definition: validationinterface.cpp:71
virtual void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
Definition: validationinterface.h:113
boost::signals2::signal< void(const CGovernanceObject &object)> NotifyGovernanceObject
Definition: validationinterface.cpp:38
void UnregisterWithMempoolSignals(CTxMemPool &pool)
Unregister with mempool.
Definition: validationinterface.cpp:75
void CallFunctionInValidationInterfaceQueue(std::function< void()> func)
Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior...
Definition: validationinterface.cpp:150
void AcceptedBlockHeader(const CBlockIndex *pindexNew)
Definition: validationinterface.cpp:218
virtual void BlockDisconnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindexDisconnected)
Notifies listeners of a block being disconnected.
Definition: validationinterface.h:107
virtual void NotifyGovernanceObject(const CGovernanceObject &object)
Definition: validationinterface.h:111
boost::signals2::signal< void(const CTransaction ¤tTx, const CTransaction &previousTx)> NotifyInstantSendDoubleSpendAttempt
Definition: validationinterface.cpp:39
void RegisterValidationInterface(CValidationInterface *pwalletIn)
Register a wallet to receive updates from core.
Definition: validationinterface.cpp:84
Definition: validationinterface.h:139
void RegisterBackgroundSignalScheduler(CScheduler &scheduler)
Register a CScheduler to give callbacks which should run in the background (may only be called once) ...
Definition: validationinterface.cpp:51
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:442
virtual void NotifyTransactionLock(const CTransaction &tx, const llmq::CInstantSendLock &islock)
Definition: validationinterface.h:108
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
void FlushBackgroundCallbacks()
Call any remaining callbacks on the calling thread.
Definition: validationinterface.cpp:60
boost::signals2::signal< void(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> SynchronousUpdatedBlockTip
Definition: validationinterface.cpp:24
void MempoolEntryRemoved(CTransactionRef tx, MemPoolRemovalReason reason)
Definition: validationinterface.cpp:164
boost::signals2::signal< void(const CBlockIndex *, bool)> NotifyHeaderTip
Definition: validationinterface.cpp:34
void NotifyInstantSendDoubleSpendAttempt(const CTransaction ¤tTx, const CTransaction &previousTx)
Definition: validationinterface.cpp:242
virtual void TransactionRemovedFromMempool(const CTransactionRef &ptx)
Notifies listeners of a transaction leaving mempool.
Definition: validationinterface.h:94
virtual void SynchronousUpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
Same as UpdatedBlockTip, but called from the caller's thread.
Definition: validationinterface.h:77
boost::signals2::signal< void(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)> NotifyMasternodeListChanged
Definition: validationinterface.cpp:40
virtual void BlockConnected(const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex, const std::vector< CTransactionRef > &txnConflicted)
Notifies listeners of a block being connected.
Definition: validationinterface.h:101
boost::signals2::signal< void(const CTransaction &tx, const llmq::CInstantSendLock &islock)> NotifyTransactionLock
Definition: validationinterface.cpp:35
void SetBestChain(const CBlockLocator &)
Definition: validationinterface.cpp:200
boost::signals2::signal< void(const CBlockIndex *pindex, const llmq::CChainLockSig &clsig)> NotifyChainLock
Definition: validationinterface.cpp:36
boost::signals2::signal< void(CTransactionRef, MemPoolRemovalReason)> NotifyEntryRemoved
Definition: txmempool.h:687
Definition: validationinterface.cpp:22
boost::signals2::signal< void(const CGovernanceVote &vote)> NotifyGovernanceVote
Definition: validationinterface.cpp:37
Definition: quorums_chainlocks.h:25
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:198
Definition: scheduler.h:37
boost::signals2::signal< void(const CBlockIndex *)> AcceptedBlockHeader
Definition: validationinterface.cpp:33
boost::signals2::signal< void(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> UpdatedBlockTip
Definition: validationinterface.cpp:23
void NewPoWValidBlock(const CBlockIndex *, const std::shared_ptr< const CBlock > &)
Definition: validationinterface.cpp:214
boost::signals2::signal< void(int64_t nBestBlockTime, CConnman *connman)> Broadcast
Definition: validationinterface.cpp:30
boost::signals2::signal< void(const CTransactionRef &)> TransactionRemovedFromMempool
Definition: validationinterface.cpp:28
void NotifyTransactionLock(const CTransaction &tx, const llmq::CInstantSendLock &islock)
Definition: validationinterface.cpp:226
void BlockConnected(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex, const std::shared_ptr< const std::vector< CTransactionRef >> &)
Definition: validationinterface.cpp:188