原始文献 / 论坛帖 / Re: JSON-RPC password
Re: JSON-RPC password
Bitcointalk · 2010-07-22 02:34:23 UTC
引用自:gavinandresen 于 July 22, 2010, 01:11:26 AM(https://bitcointalk.org/index.php?topic=461.msg4908#msg4908)
TODO:如果没设 rpc.user/rpc.password,弹对话框或在 debug.log 里警告,说明怎么设置。
在 RPC 这些代码的很多场景里,你可以像这样用 fprintf(stdout 往控制台打印:
#if defined(__WXMSW__) && wxUSE_GUI
MyMessageBox("Warning: rpc password is blank, use -rpcpw=<password>\n", "Bitcoin", wxOK | wxICON_EXCLAMATION);
#else
fprintf(stdout, "Warning: rpc password is blank, use -rpcpw=<password>\n");
#endif
英文原文
Quote from: gavinandresen on July 22, 2010, 01:11:26 AM(https://bitcointalk.org/index.php?topic=461.msg4908#msg4908)
TODO: dialog box or debug.log warning if no rpc.user/rpc.password is set, explaining how to set.
In many of the contexts of this RPC stuff, you can print to the console with fprintf(stdout, like this:
#if defined(__WXMSW__) && wxUSE_GUI
MyMessageBox("Warning: rpc password is blank, use -rpcpw=<password>
", "Bitcoin", wxOK | wxICON_EXCLAMATION);
#else
fprintf(stdout, "Warning: rpc password is blank, use -rpcpw=<password>
");
#endif
