![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
Model for Bitcoin network client. More...
#include <clientmodel.h>
Signals | |
| void | numConnectionsChanged (int count) |
| void | numBlocksChanged (int count, const QDateTime &blockDate, double nVerificationProgress, SyncType header, SynchronizationState sync_state) |
| void | mempoolSizeChanged (long count, size_t mempoolSizeInBytes, size_t mempoolMaxSizeInBytes) |
| void | networkActiveChanged (bool networkActive) |
| void | alertsChanged (const QString &warnings) |
| void | bytesChanged (quint64 totalBytesIn, quint64 totalBytesOut) |
| void | message (const QString &title, const QString &message, unsigned int style) |
| Fired when a message should be reported to the user. | |
| void | showProgress (const QString &title, int nProgress) |
Public Member Functions | |
| ClientModel (interfaces::Node &node, OptionsModel *optionsModel, QObject *parent=nullptr) | |
| ~ClientModel () | |
| void | stop () |
| interfaces::Node & | node () const |
| OptionsModel * | getOptionsModel () |
| PeerTableModel * | getPeerTableModel () |
| PeerTableSortProxy * | peerTableSortProxy () |
| BanTableModel * | getBanTableModel () |
| int | getNumConnections (unsigned int flags=CONNECTIONS_ALL) const |
| Return number of connections, default is in- and outbound (total). | |
| std::map< CNetAddr, LocalServiceInfo > | getNetLocalAddresses () const |
| int | getNumBlocks () const |
| uint256 | getBestBlockHash () EXCLUSIVE_LOCKS_REQUIRED(!m_cached_tip_mutex) |
| int | getHeaderTipHeight () const |
| int64_t | getHeaderTipTime () const |
| BlockSource | getBlockSource () const |
| Returns the block source of the current importing/syncing state. | |
| QString | getStatusBarWarnings () const |
| Return warnings to be displayed in status bar. | |
| QString | formatFullVersion () const |
| QString | formatSubVersion () const |
| bool | isReleaseVersion () const |
| QString | formatClientStartupTime () const |
| QString | dataDir () const |
| QString | blocksDir () const |
| bool | getProxyInfo (std::string &ip_port) const |
| uint256 m_cached_tip_blocks | GUARDED_BY (m_cached_tip_mutex) |
Public Attributes | |
| std::atomic< int > | cachedBestHeaderHeight |
| std::atomic< int64_t > | cachedBestHeaderTime |
| std::atomic< int > | m_cached_num_blocks {-1} |
| Mutex | m_cached_tip_mutex |
Private Member Functions | |
| void | TipChanged (SynchronizationState sync_state, interfaces::BlockTip tip, double verification_progress, SyncType synctype) EXCLUSIVE_LOCKS_REQUIRED(!m_cached_tip_mutex) |
| void | subscribeToCoreSignals () |
| void | unsubscribeFromCoreSignals () |
Private Attributes | |
| interfaces::Node & | m_node |
| std::vector< std::unique_ptr< interfaces::Handler > > | m_event_handlers |
| OptionsModel * | optionsModel |
| PeerTableModel * | peerTableModel {nullptr} |
| PeerTableSortProxy * | m_peer_table_sort_proxy {nullptr} |
| BanTableModel * | banTableModel {nullptr} |
| QThread *const | m_thread |
| A thread to interact with m_node asynchronously. | |
Model for Bitcoin network client.
Definition at line 56 of file clientmodel.h.
|
explicit |
| ClientModel::~ClientModel | ( | ) |
|
signal |
| QString ClientModel::blocksDir | ( | ) | const |
Definition at line 221 of file clientmodel.cpp.
|
signal |
| QString ClientModel::dataDir | ( | ) | const |
Definition at line 216 of file clientmodel.cpp.
| QString ClientModel::formatClientStartupTime | ( | ) | const |
Definition at line 211 of file clientmodel.cpp.
| QString ClientModel::formatFullVersion | ( | ) | const |
Definition at line 196 of file clientmodel.cpp.
| QString ClientModel::formatSubVersion | ( | ) | const |
| BanTableModel * ClientModel::getBanTableModel | ( | ) |
| uint256 ClientModel::getBestBlockHash | ( | ) |
| BlockSource ClientModel::getBlockSource | ( | ) | const |
Returns the block source of the current importing/syncing state.
Definition at line 164 of file clientmodel.cpp.
| int ClientModel::getHeaderTipHeight | ( | ) | const |
Definition at line 98 of file clientmodel.cpp.
| int64_t ClientModel::getHeaderTipTime | ( | ) | const |
Definition at line 113 of file clientmodel.cpp.
| std::map< CNetAddr, LocalServiceInfo > ClientModel::getNetLocalAddresses | ( | ) | const |
Definition at line 127 of file clientmodel.cpp.
| int ClientModel::getNumBlocks | ( | ) | const |
Definition at line 133 of file clientmodel.cpp.
| int ClientModel::getNumConnections | ( | unsigned int | flags = CONNECTIONS_ALL | ) | const |
Return number of connections, default is in- and outbound (total).
Definition at line 84 of file clientmodel.cpp.
| OptionsModel * ClientModel::getOptionsModel | ( | ) |
| PeerTableModel * ClientModel::getPeerTableModel | ( | ) |
| bool ClientModel::getProxyInfo | ( | std::string & | ip_port | ) | const |
| QString ClientModel::getStatusBarWarnings | ( | ) | const |
Return warnings to be displayed in status bar.
Definition at line 171 of file clientmodel.cpp.
|
inline |
Definition at line 100 of file clientmodel.h.
| bool ClientModel::isReleaseVersion | ( | ) | const |
Definition at line 206 of file clientmodel.cpp.
|
signal |
|
signal |
Fired when a message should be reported to the user.
|
signal |
|
inline |
|
signal |
|
signal |
| PeerTableSortProxy * ClientModel::peerTableSortProxy | ( | ) |
|
signal |
| void ClientModel::stop | ( | ) |
Definition at line 71 of file clientmodel.cpp.
|
private |
|
private |
|
private |
|
private |
Definition at line 108 of file clientmodel.h.
|
mutable |
Definition at line 95 of file clientmodel.h.
|
mutable |
Definition at line 96 of file clientmodel.h.
|
mutable |
Definition at line 97 of file clientmodel.h.
| Mutex ClientModel::m_cached_tip_mutex |
Definition at line 99 of file clientmodel.h.
|
private |
Definition at line 104 of file clientmodel.h.
|
private |
Definition at line 103 of file clientmodel.h.
|
private |
Definition at line 107 of file clientmodel.h.
|
private |
A thread to interact with m_node asynchronously.
Definition at line 111 of file clientmodel.h.
|
private |
Definition at line 105 of file clientmodel.h.
|
private |
Definition at line 106 of file clientmodel.h.