Merge remote-tracking branch 'zcash/master' into dev
# Conflicts: # .gitignore # README.md # src/Makefile.gtest.include # src/gtest/test_checkblock.cpp # src/init.cpp # src/main.cpp # src/main.h # src/rpcserver.cpp # src/test/checkblock_tests.cpp # src/util.cpp
This commit is contained in:
@@ -309,7 +309,9 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "blockchain", "kvupdate", &kvupdate, true },
|
||||
|
||||
/* Mining */
|
||||
#ifdef ENABLE_WALLET
|
||||
{ "mining", "getblocktemplate", &getblocktemplate, true },
|
||||
#endif
|
||||
{ "mining", "getmininginfo", &getmininginfo, true },
|
||||
{ "mining", "getlocalsolps", &getlocalsolps, true },
|
||||
{ "mining", "getnetworksolps", &getnetworksolps, true },
|
||||
@@ -629,10 +631,9 @@ void StartRPCThreads()
|
||||
strAllowed += subnet.ToString() + " ";
|
||||
LogPrint("rpc", "Allowing RPC connections from: %s\n", strAllowed);
|
||||
|
||||
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
|
||||
if (((mapArgs["-rpcpassword"] == "") ||
|
||||
(mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) && Params().RequireRPCPassword())
|
||||
if (mapArgs["-rpcpassword"] == "")
|
||||
{
|
||||
/*<<<<<<< HEAD
|
||||
unsigned char rand_pwd[32];
|
||||
GetRandBytes(rand_pwd, 32);
|
||||
uiInterface.ThreadSafeMessageBox(strprintf(
|
||||
@@ -651,6 +652,18 @@ void StartRPCThreads()
|
||||
"", CClientUIInterface::MSG_ERROR | CClientUIInterface::SECURE);
|
||||
StartShutdown();
|
||||
return;
|
||||
=======*/
|
||||
LogPrintf("No rpcpassword set - using random cookie authentication\n");
|
||||
if (!GenerateAuthCookie(&strRPCUserColonPass)) {
|
||||
uiInterface.ThreadSafeMessageBox(
|
||||
_("Error: A fatal internal error occured, see debug.log for details"), // Same message as AbortNode
|
||||
"", CClientUIInterface::MSG_ERROR);
|
||||
StartShutdown();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
|
||||
//>>>>>>> zcash/master
|
||||
}
|
||||
|
||||
assert(rpc_io_service == NULL);
|
||||
@@ -817,6 +830,8 @@ void StopRPCThreads()
|
||||
}
|
||||
deadlineTimers.clear();
|
||||
|
||||
DeleteAuthCookie();
|
||||
|
||||
rpc_io_service->stop();
|
||||
g_rpcSignals.Stopped();
|
||||
if (rpc_worker_group != NULL)
|
||||
|
||||
Reference in New Issue
Block a user