17 #include <boost/signals2/signal.hpp> 20 boost::signals2::signal<void (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)>
UpdatedBlockTip;
22 boost::signals2::signal<void (const std::shared_ptr<const CBlock> &,
const CBlockIndex *pindex,
const std::vector<CTransactionRef>&)>
BlockConnected;
24 boost::signals2::signal<void (const CBlockLocator &)>
SetBestChain;
25 boost::signals2::signal<void (const uint256 &)>
Inventory;
26 boost::signals2::signal<void (int64_t nBestBlockTime, CConnman* connman)>
Broadcast;
27 boost::signals2::signal<void (const CBlock&, const CValidationState&)>
BlockChecked;
28 boost::signals2::signal<void (const CBlockIndex *, const std::shared_ptr<const CBlock>&)>
NewPoWValidBlock;
30 boost::signals2::signal<void (const uint256 &)>
BlockFound;
49 m_internals.reset(
nullptr);
53 m_internals->m_schedulerClient.EmptyQueue();
90 g_signals.
m_internals->BlockFound.disconnect_all_slots();
91 g_signals.
m_internals->ScriptForMining.disconnect_all_slots();
92 g_signals.
m_internals->BlockChecked.disconnect_all_slots();
93 g_signals.
m_internals->Broadcast.disconnect_all_slots();
94 g_signals.
m_internals->Inventory.disconnect_all_slots();
95 g_signals.
m_internals->SetBestChain.disconnect_all_slots();
96 g_signals.
m_internals->TransactionAddedToMempool.disconnect_all_slots();
97 g_signals.
m_internals->BlockConnected.disconnect_all_slots();
98 g_signals.
m_internals->BlockDisconnected.disconnect_all_slots();
99 g_signals.
m_internals->UpdatedBlockTip.disconnect_all_slots();
100 g_signals.
m_internals->NewPoWValidBlock.disconnect_all_slots();
104 m_internals->UpdatedBlockTip(pindexNew, pindexFork, fInitialDownload);
108 m_internals->TransactionAddedToMempool(ptx);
112 m_internals->BlockConnected(pblock, pindex, vtxConflicted);
116 m_internals->BlockDisconnected(pblock);
120 m_internals->SetBestChain(locator);
124 m_internals->Inventory(hash);
128 m_internals->Broadcast(nBestBlockTime, connman);
132 m_internals->BlockChecked(block, state);
136 m_internals->NewPoWValidBlock(pindex, block);
140 m_internals->ScriptForMining(coinbaseScript);
144 m_internals->BlockFound(hash);
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)
Class used by CScheduler clients which may schedule multiple jobs which are required to be run serial...
virtual void ResetRequestCount(const uint256 &)
boost::signals2::signal< void(const CTransactionRef &)> TransactionAddedToMempool
std::unique_ptr< MainSignalsInstance > m_internals
virtual void BlockChecked(const CBlock &, const CValidationState &)
Notifies listeners of a block validation result.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
boost::signals2::signal< void(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex, const std::vector< CTransactionRef > &)> BlockConnected
boost::signals2::signal< void(const uint256 &)> Inventory
virtual void ResendWalletTransactions(int64_t nBestBlockTime, CConnman *connman)
Tells listeners to broadcast their data.
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...
boost::signals2::signal< void(const CBlock &, const CValidationState &)> BlockChecked
void BlockFound(const uint256 &)
void UnregisterBackgroundSignalScheduler()
Unregister a CScheduler to give callbacks which should run in the background - these callbacks will n...
virtual void SetBestChain(const CBlockLocator &locator)
Notifies listeners of the new active block chain on-disk.
assert(len-trim+(2 *lenIndices)<=WIDTH)
void UnregisterAllValidationInterfaces()
Unregister all wallets from core.
void Inventory(const uint256 &)
void UnregisterValidationInterface(CValidationInterface *pwalletIn)
Unregister a wallet from core.
void Broadcast(int64_t nBestBlockTime, CConnman *connman)
void BlockChecked(const CBlock &, const CValidationState &)
std::shared_ptr< const CTransaction > CTransactionRef
virtual void BlockDisconnected(const std::shared_ptr< const CBlock > &block)
Notifies listeners of a block being disconnected.
virtual void Inventory(const uint256 &hash)
Notifies listeners about an inventory item being seen on the network.
boost::signals2::signal< void(const CBlockLocator &)> SetBestChain
void BlockConnected(const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex, const std::vector< CTransactionRef > &)
SingleThreadedSchedulerClient m_schedulerClient
MainSignalsInstance(CScheduler *pscheduler)
boost::signals2::signal< void(const CBlockIndex *, const std::shared_ptr< const CBlock > &)> NewPoWValidBlock
virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
Notifies listeners of updated block chain tip.
CMainSignals & GetMainSignals()
virtual void GetScriptForMining(std::shared_ptr< CReserveScript > &coinbaseScript)
void RegisterValidationInterface(CValidationInterface *pwalletIn)
Register a wallet to receive updates from core.
void RegisterBackgroundSignalScheduler(CScheduler &scheduler)
Register a CScheduler to give callbacks which should run in the background (may only be called once) ...
Capture information about block/transaction validation.
boost::signals2::signal< void(std::shared_ptr< CReserveScript > &)> ScriptForMining
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.
boost::signals2::signal< void(const uint256 &)> BlockFound
boost::signals2::signal< void(const std::shared_ptr< const CBlock > &)> BlockDisconnected
virtual void TransactionAddedToMempool(const CTransactionRef &ptxn)
Notifies listeners of a transaction having been added to mempool.
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.
void SetBestChain(const CBlockLocator &)
void BlockDisconnected(const std::shared_ptr< const CBlock > &)
void ScriptForMining(std::shared_ptr< CReserveScript > &coinbaseScript)
boost::signals2::signal< void(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> UpdatedBlockTip
void NewPoWValidBlock(const CBlockIndex *, const std::shared_ptr< const CBlock > &)
boost::signals2::signal< void(int64_t nBestBlockTime, CConnman *connman)> Broadcast
void TransactionAddedToMempool(const CTransactionRef &)