You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c3055bb Add help-console command to Qt debug console (Luke Mlsna)
Pull request description:
This PR would close issue #9195 by adding documentation for the debug console features (mainly nested commands) which were added in [PR #7783](#7783).
The following changes were made to QT debug console code:
- Added a line to the initial message text at the top of the debug console:
> For more information on using this console type **help-console**.
- Added a pseudo-command `help-console` which is hooked after parsing the request, but before actually executing the RPC thread. It prints the following text to the console as if it were a valid RPC response.
> This console accepts RPC commands using the standard syntax.
> example: getblockhash 8
> This console can also accept RPC commands using bracketed syntax.
> example: getblockhash(8)
> A space or a comma can be used to separate arguments for either syntax.
> example: sendtoaddress \<address\> \<amount\>
> sendtoaddress,\<address\>,\<amount\>
> Commands may be nested when specified with the bracketed syntax.
> example: getblockinfo(getblockhash(0),true).
> Result values can be queried with a non-quoted string in brackets.
> example: getblock(getblockhash(0) true)[height]
This seemed like a reasonably sane way to introduce a fake RPC help command, but
Tree-SHA512: 35d73dcef9c4936b8be99e80978169f117c22b94f4400c91097bf7e0e1489060202dcd738d9debdf4c8a7bd10709e2c19d4f625f19e47c4a034f1d6019c0e0f2
message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(tr(PACKAGE_NAME)) + "<br>" +
752
779
tr("Use up and down arrows to navigate history, and %1 to clear screen.").arg("<b>"+clsKey+"</b>") + "<br>" +
753
-
tr("Type <b>help</b> for an overview of available commands.")) +
754
-
"<br><span class=\"secwarning\">" +
780
+
tr("Type %1 for an overview of available commands.").arg("<b>help</b>") + "<br>" +
781
+
tr("For more information on using this console type %1.").arg("<b>help-console</b>") +
782
+
"<br><span class=\"secwarning\"><br>" +
755
783
tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") +
0 commit comments