![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
Local Bitcoin RPC console. More...
#include <rpcconsole.h>
Classes | |
| struct | TranslatedStrings |
Public Types | |
| enum | MessageClass { MC_ERROR , MC_DEBUG , CMD_REQUEST , CMD_REPLY , CMD_ERROR } |
| enum class | TabTypes { INFO , CONSOLE , GRAPH , PEERS } |
Public Slots | |
| void | clear (bool keep_prompt=false) |
| void | fontBigger () |
| void | fontSmaller () |
| void | setFontSize (int newSize) |
| void | message (int category, const QString &msg) |
| Append the message to the message widget. | |
| void | message (int category, const QString &message, bool html) |
| void | setNumConnections (int count) |
| Set number of connections shown in the UI. | |
| void | setNetworkActive (bool networkActive) |
| Set network state shown in the UI. | |
| void | setNumBlocks (int count, const QDateTime &blockDate, double nVerificationProgress, SyncType synctype) |
| Set number of blocks and last block date shown in the UI. | |
| void | setMempoolSize (long numberOfTxs, size_t dynUsage, size_t maxUsage) |
| Set size (number of transactions and memory usage) of the mempool in the UI. | |
| void | browseHistory (int offset) |
| Go forward or back in history. | |
| void | scrollToEnd () |
| Scroll console view to end. | |
| void | disconnectSelectedNode () |
| Disconnect a selected node on the Peers tab. | |
| void | banSelectedNode (int bantime) |
| Ban a selected node on the Peers tab. | |
| void | unbanSelectedNode () |
| Unban a selected node on the Bans tab. | |
| void | setTabFocus (enum TabTypes tabType) |
| set which tab has the focus (is visible) | |
Public Member Functions | |
| RPCConsole (interfaces::Node &node, const PlatformStyle *platformStyle, QWidget *parent) | |
| ~RPCConsole () | |
| void | setClientModel (ClientModel *model=nullptr, int bestblock_height=0, int64_t bestblock_date=0, double verification_progress=0.0) |
| std::vector< TabTypes > | tabs () const |
| QString | tabTitle (TabTypes tab_type) const |
| QKeySequence | tabShortcut (TabTypes tab_type) const |
Static Public Member Functions | |
| static bool | RPCParseCommandLine (interfaces::Node *node, std::string &strResult, const std::string &strCommand, bool fExecute, std::string *pstrFilteredOut=nullptr, const QString &wallet_name={}) |
| Split shell command line into a list of arguments and optionally execute the command(s). | |
| static bool | RPCExecuteCommandLine (interfaces::Node &node, std::string &strResult, const std::string &strCommand, std::string *const pstrFilteredOut=nullptr, const QString &wallet_name={}) |
Protected Member Functions | |
| virtual bool | eventFilter (QObject *obj, QEvent *event) override |
| void | keyPressEvent (QKeyEvent *) override |
| void | changeEvent (QEvent *e) override |
Private Types | |
| enum | ColumnWidths { ADDRESS_COLUMN_WIDTH = 200 , SUBVERSION_COLUMN_WIDTH = 150 , PING_COLUMN_WIDTH = 80 , BANSUBNET_COLUMN_WIDTH = 200 , BANTIME_COLUMN_WIDTH = 250 } |
Private Slots | |
| void | on_lineEdit_returnPressed () |
| void | on_tabWidget_currentChanged (int index) |
| void | on_openDebugLogfileButton_clicked () |
| open the debug.log from the current datadir | |
| void | on_sldGraphRange_valueChanged (int value) |
| change the time range of the network traffic graph | |
| void | updateTrafficStats (quint64 totalBytesIn, quint64 totalBytesOut) |
| update traffic statistics | |
| void | resizeEvent (QResizeEvent *event) override |
| void | showEvent (QShowEvent *event) override |
| void | hideEvent (QHideEvent *event) override |
| void | showPeersTableContextMenu (const QPoint &point) |
| Show custom context menu on Peers tab. | |
| void | showBanTableContextMenu (const QPoint &point) |
| Show custom context menu on Bans tab. | |
| void | showOrHideBanTableIfRequired () |
| Hides ban table if no bans are present. | |
| void | clearSelectedNode () |
| clear the selected node | |
| void | updateDetailWidget () |
| show detailed information on ui about selected node | |
| void | updateAlerts (const QString &warnings) |
Private Member Functions | |
| void | startExecutor () |
| void | setTrafficGraphRange (int mins) |
| void | updateNetworkState () |
| Update UI with latest network info from model. | |
| QString | TimeDurationField (std::chrono::seconds time_now, std::chrono::seconds time_at_event) const |
| Helper for the output of a time duration field. | |
| void | updateWindowTitle () |
Private Attributes | |
| struct RPCConsole::TranslatedStrings | ts |
| interfaces::Node & | m_node |
| Ui::RPCConsole *const | ui |
| ClientModel * | clientModel = nullptr |
| QStringList | history |
| int | historyPtr = 0 |
| QString | cmdBeforeBrowsing |
| QList< NodeId > | cachedNodeids |
| const PlatformStyle *const | platformStyle |
| QMenu * | peersTableContextMenu = nullptr |
| QMenu * | banTableContextMenu = nullptr |
| int | consoleFontSize = 0 |
| QCompleter * | autoCompleter = nullptr |
| QThread | thread |
| RPCExecutor * | m_executor {nullptr} |
| WalletModel * | m_last_wallet_model {nullptr} |
| bool | m_is_executing {false} |
| QByteArray | m_peer_widget_header_state |
| QByteArray | m_banlist_widget_header_state |
Local Bitcoin RPC console.
Definition at line 43 of file rpcconsole.h.
|
private |
| Enumerator | |
|---|---|
| ADDRESS_COLUMN_WIDTH | |
| SUBVERSION_COLUMN_WIDTH | |
| PING_COLUMN_WIDTH | |
| BANSUBNET_COLUMN_WIDTH | |
| BANTIME_COLUMN_WIDTH | |
Definition at line 153 of file rpcconsole.h.
| Enumerator | |
|---|---|
| MC_ERROR | |
| MC_DEBUG | |
| CMD_REQUEST | |
| CMD_REPLY | |
| CMD_ERROR | |
Definition at line 63 of file rpcconsole.h.
|
strong |
| Enumerator | |
|---|---|
| INFO | |
| CONSOLE | |
| GRAPH | |
| PEERS | |
Definition at line 71 of file rpcconsole.h.
|
explicit |
Definition at line 437 of file rpcconsole.cpp.
| RPCConsole::~RPCConsole | ( | ) |
|
slot |
Ban a selected node on the Peers tab.
Definition at line 1290 of file rpcconsole.cpp.
|
slot |
Go forward or back in history.
Definition at line 1065 of file rpcconsole.cpp.
|
overrideprotected |
Definition at line 898 of file rpcconsole.cpp.
|
slot |
|
privateslot |
clear the selected node
Definition at line 1324 of file rpcconsole.cpp.
|
slot |
Disconnect a selected node on the Peers tab.
Definition at line 1276 of file rpcconsole.cpp.
|
overrideprotectedvirtual |
|
slot |
Definition at line 797 of file rpcconsole.cpp.
|
slot |
Definition at line 802 of file rpcconsole.cpp.
|
overrideprivateslot |
Definition at line 1246 of file rpcconsole.cpp.
|
overrideprotected |
|
slot |
|
inlineslot |
Append the message to the message widget.
Definition at line 117 of file rpcconsole.h.
|
privateslot |
|
privateslot |
open the debug.log from the current datadir
Definition at line 1118 of file rpcconsole.cpp.
|
privateslot |
change the time range of the network traffic graph
Definition at line 1129 of file rpcconsole.cpp.
|
privateslot |
Definition at line 1111 of file rpcconsole.cpp.
|
overrideprivateslot |
Definition at line 1230 of file rpcconsole.cpp.
|
inlinestatic |
|
static |
Split shell command line into a list of arguments and optionally execute the command(s).
Aims to emulate bash and friends.
\ is used as escape character" and backslashes before a \c " or another backslash| [in] | node | optional node to execute command on |
| [out] | strResult | stringified result from the executed command(chain) |
| [in] | strCommand | Command line to split |
| [in] | fExecute | set true if you want the command to be executed |
| [out] | pstrFilteredOut | Command line, filtered to remove any sensitive data |
Definition at line 141 of file rpcconsole.cpp.
|
slot |
Scroll console view to end.
Definition at line 1123 of file rpcconsole.cpp.
| void RPCConsole::setClientModel | ( | ClientModel * | model = nullptr, |
| int | bestblock_height = 0, | ||
| int64_t | bestblock_date = 0, | ||
| double | verification_progress = 0.0 ) |
|
slot |
Definition at line 807 of file rpcconsole.cpp.
|
slot |
Set size (number of transactions and memory usage) of the mempool in the UI.
Definition at line 980 of file rpcconsole.cpp.
|
slot |
Set network state shown in the UI.
Definition at line 967 of file rpcconsole.cpp.
|
slot |
Set number of blocks and last block date shown in the UI.
Definition at line 972 of file rpcconsole.cpp.
|
slot |
Set number of connections shown in the UI.
Definition at line 959 of file rpcconsole.cpp.
|
slot |
set which tab has the focus (is visible)
Definition at line 1341 of file rpcconsole.cpp.
|
private |
Definition at line 1136 of file rpcconsole.cpp.
|
privateslot |
Show custom context menu on Bans tab.
Definition at line 1269 of file rpcconsole.cpp.
|
overrideprivateslot |
Definition at line 1235 of file rpcconsole.cpp.
|
privateslot |
Hides ban table if no bans are present.
Definition at line 1331 of file rpcconsole.cpp.
|
privateslot |
Show custom context menu on Peers tab.
Definition at line 1262 of file rpcconsole.cpp.
|
private |
Definition at line 1086 of file rpcconsole.cpp.
|
inline |
Definition at line 78 of file rpcconsole.h.
| QKeySequence RPCConsole::tabShortcut | ( | TabTypes | tab_type | ) | const |
| QString RPCConsole::tabTitle | ( | TabTypes | tab_type | ) | const |
Definition at line 1346 of file rpcconsole.cpp.
|
inlineprivate |
Helper for the output of a time duration field.
Inputs are UNIX epoch times.
Definition at line 186 of file rpcconsole.h.
|
slot |
Unban a selected node on the Bans tab.
Definition at line 1307 of file rpcconsole.cpp.
|
privateslot |
|
privateslot |
show detailed information on ui about selected node
Definition at line 1148 of file rpcconsole.cpp.
|
private |
Update UI with latest network info from model.
Definition at line 933 of file rpcconsole.cpp.
|
privateslot |
update traffic statistics
Definition at line 1142 of file rpcconsole.cpp.
|
private |
Definition at line 1369 of file rpcconsole.cpp.
|
private |
Definition at line 174 of file rpcconsole.h.
|
private |
Definition at line 172 of file rpcconsole.h.
|
private |
Definition at line 169 of file rpcconsole.h.
|
private |
Definition at line 165 of file rpcconsole.h.
|
private |
Definition at line 168 of file rpcconsole.h.
|
private |
Definition at line 173 of file rpcconsole.h.
|
private |
Definition at line 166 of file rpcconsole.h.
|
private |
Definition at line 167 of file rpcconsole.h.
|
private |
Definition at line 180 of file rpcconsole.h.
|
private |
Definition at line 176 of file rpcconsole.h.
|
private |
Definition at line 178 of file rpcconsole.h.
|
private |
Definition at line 177 of file rpcconsole.h.
|
private |
Definition at line 163 of file rpcconsole.h.
|
private |
Definition at line 179 of file rpcconsole.h.
|
private |
Definition at line 171 of file rpcconsole.h.
|
private |
Definition at line 170 of file rpcconsole.h.
|
private |
Definition at line 175 of file rpcconsole.h.
|
private |
|
private |
Definition at line 164 of file rpcconsole.h.