Skip to content

Commit 5a60b66

Browse files
committed
Use a messagebox to display the error when -server is provided without providing a rpc password
1 parent 7cfbe1f commit 5a60b66

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/bitcoinrpc.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,16 +2362,17 @@ void ThreadRPCServer2(void* parg)
23622362
strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
23632363
else if (mapArgs.count("-daemon"))
23642364
strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\"");
2365-
std::string strMessage = _("%s, you must set a rpcpassword in the configuration file:\n %s\n"
2366-
"It is recommended you use the following random password:\n"
2367-
"rpcuser=bitcoinrpc\n"
2368-
"rpcpassword=%s\n"
2369-
"(you do not need to remember this password)\n"
2370-
"If the file does not exist, create it with owner-readable-only file permissions.\n");
2371-
fprintf(stderr, strMessage.c_str(),
2365+
ThreadSafeMessageBox(strprintf(
2366+
_("%s, you must set a rpcpassword in the configuration file:\n %s\n"
2367+
"It is recommended you use the following random password:\n"
2368+
"rpcuser=bitcoinrpc\n"
2369+
"rpcpassword=%s\n"
2370+
"(you do not need to remember this password)\n"
2371+
"If the file does not exist, create it with owner-readable-only file permissions.\n"),
23722372
strWhatAmI.c_str(),
23732373
GetConfigFile().c_str(),
2374-
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str());
2374+
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()),
2375+
_("Error"), wxOK | wxMODAL);
23752376
QueueShutdown();
23762377
return;
23772378
}

0 commit comments

Comments
 (0)