![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
#include <validationinterface.h>
Public Member Functions | |
| ValidationSignals (std::unique_ptr< util::TaskRunnerInterface > task_runner) | |
| ~ValidationSignals () | |
| void | FlushBackgroundCallbacks () |
| Call any remaining callbacks on the calling thread. More... | |
| size_t | CallbacksPending () |
| void | RegisterValidationInterface (CValidationInterface *callbacks) |
| Register subscriber. More... | |
| void | UnregisterValidationInterface (CValidationInterface *callbacks) |
| Unregister subscriber. More... | |
| void | UnregisterAllValidationInterfaces () |
| Unregister all subscribers. More... | |
| void | RegisterSharedValidationInterface (std::shared_ptr< CValidationInterface > callbacks) |
| Register subscriber. More... | |
| void | UnregisterSharedValidationInterface (std::shared_ptr< CValidationInterface > callbacks) |
| Unregister subscriber. More... | |
| void | CallFunctionInValidationInterfaceQueue (std::function< void()> func) |
| Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior to now are finished when the function is called. More... | |
| void | SyncWithValidationInterfaceQueue () LOCKS_EXCLUDED(cs_main) |
| This is a synonym for the following, which asserts certain locks are not held: std::promise<void> promise; CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); promise.get_future().wait();. More... | |
| void | UpdatedBlockTip (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload) |
| void | ActiveTipChange (const CBlockIndex &, bool) |
| void | TransactionAddedToMempool (const NewMempoolTransactionInfo &, uint64_t mempool_sequence) |
| void | TransactionRemovedFromMempool (const CTransactionRef &, MemPoolRemovalReason, uint64_t mempool_sequence) |
| void | MempoolTransactionsRemovedForBlock (const std::vector< RemovedMempoolTransactionInfo > &, unsigned int nBlockHeight) |
| void | BlockConnected (const kernel::ChainstateRole &, const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex) |
| void | BlockDisconnected (const std::shared_ptr< const CBlock > &, const CBlockIndex *pindex) |
| void | ChainStateFlushed (const kernel::ChainstateRole &, const CBlockLocator &) |
| void | BlockChecked (const std::shared_ptr< const CBlock > &, const BlockValidationState &) |
| void | NewPoWValidBlock (const CBlockIndex *, const std::shared_ptr< const CBlock > &) |
Private Attributes | |
| std::unique_ptr< ValidationSignalsImpl > | m_internals |
Definition at line 166 of file validationinterface.h.
|
explicit |
Definition at line 97 of file validationinterface.cpp.
|
default |
| void ValidationSignals::ActiveTipChange | ( | const CBlockIndex & | new_tip, |
| bool | is_ibd | ||
| ) |
| void ValidationSignals::BlockChecked | ( | const std::shared_ptr< const CBlock > & | block, |
| const BlockValidationState & | state | ||
| ) |
Definition at line 253 of file validationinterface.cpp.
| void ValidationSignals::BlockConnected | ( | const kernel::ChainstateRole & | role, |
| const std::shared_ptr< const CBlock > & | pblock, | ||
| const CBlockIndex * | pindex | ||
| ) |
| void ValidationSignals::BlockDisconnected | ( | const std::shared_ptr< const CBlock > & | pblock, |
| const CBlockIndex * | pindex | ||
| ) |
Definition at line 234 of file validationinterface.cpp.
| size_t ValidationSignals::CallbacksPending | ( | ) |
Definition at line 107 of file validationinterface.cpp.
| void ValidationSignals::CallFunctionInValidationInterfaceQueue | ( | std::function< void()> | func | ) |
Pushes a function to callback onto the notification queue, guaranteeing any callbacks generated prior to now are finished when the function is called.
Be very careful blocking on func to be called if any locks are held - validation interface clients may not be able to make progress as they often wait for things like cs_main, so blocking until func is called with cs_main will result in a deadlock (that DEBUG_LOCKORDER will miss).
Definition at line 141 of file validationinterface.cpp.
| void ValidationSignals::ChainStateFlushed | ( | const kernel::ChainstateRole & | role, |
| const CBlockLocator & | locator | ||
| ) |
Definition at line 244 of file validationinterface.cpp.
| void ValidationSignals::FlushBackgroundCallbacks | ( | ) |
Call any remaining callbacks on the calling thread.
Definition at line 102 of file validationinterface.cpp.
| void ValidationSignals::MempoolTransactionsRemovedForBlock | ( | const std::vector< RemovedMempoolTransactionInfo > & | txs_removed_for_block, |
| unsigned int | nBlockHeight | ||
| ) |
Definition at line 224 of file validationinterface.cpp.
| void ValidationSignals::NewPoWValidBlock | ( | const CBlockIndex * | pindex, |
| const std::shared_ptr< const CBlock > & | block | ||
| ) |
Definition at line 260 of file validationinterface.cpp.
| void ValidationSignals::RegisterSharedValidationInterface | ( | std::shared_ptr< CValidationInterface > | callbacks | ) |
Register subscriber.
Definition at line 112 of file validationinterface.cpp.
| void ValidationSignals::RegisterValidationInterface | ( | CValidationInterface * | callbacks | ) |
Register subscriber.
Definition at line 119 of file validationinterface.cpp.
| void ValidationSignals::SyncWithValidationInterfaceQueue | ( | ) |
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> promise; CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); promise.get_future().wait();.
Definition at line 146 of file validationinterface.cpp.
| void ValidationSignals::TransactionAddedToMempool | ( | const NewMempoolTransactionInfo & | tx, |
| uint64_t | mempool_sequence | ||
| ) |
| void ValidationSignals::TransactionRemovedFromMempool | ( | const CTransactionRef & | tx, |
| MemPoolRemovalReason | reason, | ||
| uint64_t | mempool_sequence | ||
| ) |
Definition at line 204 of file validationinterface.cpp.
| void ValidationSignals::UnregisterAllValidationInterfaces | ( | ) |
Unregister all subscribers.
Definition at line 136 of file validationinterface.cpp.
| void ValidationSignals::UnregisterSharedValidationInterface | ( | std::shared_ptr< CValidationInterface > | callbacks | ) |
Unregister subscriber.
Definition at line 126 of file validationinterface.cpp.
| void ValidationSignals::UnregisterValidationInterface | ( | CValidationInterface * | callbacks | ) |
Unregister subscriber.
DEPRECATED. This is not safe to use when the RPC server or main message handler thread is running.
Definition at line 131 of file validationinterface.cpp.
| void ValidationSignals::UpdatedBlockTip | ( | const CBlockIndex * | pindexNew, |
| const CBlockIndex * | pindexFork, | ||
| bool | fInitialDownload | ||
| ) |
|
private |
Definition at line 168 of file validationinterface.h.