Merge pull request #6398

85ee55b rpc: Remove chain-specific RequireRPCPassword (Wladimir J. van der Laan)
pull/4570/merge
Wladimir J. van der Laan 9 years ago
commit 3d9362d5ac
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

@ -98,7 +98,6 @@ public:
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
fRequireRPCPassword = true;
fMiningRequiresPeers = true; fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false; fDefaultConsistencyChecks = false;
fRequireStandard = true; fRequireStandard = true;
@ -169,7 +168,6 @@ public:
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
fRequireRPCPassword = true;
fMiningRequiresPeers = true; fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false; fDefaultConsistencyChecks = false;
fRequireStandard = false; fRequireStandard = false;
@ -215,7 +213,6 @@ public:
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds. vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds. vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.
fRequireRPCPassword = false;
fMiningRequiresPeers = false; fMiningRequiresPeers = false;
fDefaultConsistencyChecks = true; fDefaultConsistencyChecks = true;
fRequireStandard = false; fRequireStandard = false;

@ -51,7 +51,6 @@ public:
int GetDefaultPort() const { return nDefaultPort; } int GetDefaultPort() const { return nDefaultPort; }
const CBlock& GenesisBlock() const { return genesis; } const CBlock& GenesisBlock() const { return genesis; }
bool RequireRPCPassword() const { return fRequireRPCPassword; }
/** Make miner wait to have peers to avoid wasting work */ /** Make miner wait to have peers to avoid wasting work */
bool MiningRequiresPeers() const { return fMiningRequiresPeers; } bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
/** Default value for -checkmempool and -checkblockindex argument */ /** Default value for -checkmempool and -checkblockindex argument */
@ -83,7 +82,6 @@ protected:
std::string strNetworkID; std::string strNetworkID;
CBlock genesis; CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds; std::vector<SeedSpec6> vFixedSeeds;
bool fRequireRPCPassword;
bool fMiningRequiresPeers; bool fMiningRequiresPeers;
bool fDefaultConsistencyChecks; bool fDefaultConsistencyChecks;
bool fRequireStandard; bool fRequireStandard;

@ -598,8 +598,7 @@ void StartRPCThreads()
LogPrint("rpc", "Allowing RPC connections from: %s\n", strAllowed); LogPrint("rpc", "Allowing RPC connections from: %s\n", strAllowed);
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
if (((mapArgs["-rpcpassword"] == "") || if (mapArgs["-rpcpassword"] == "")
(mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) && Params().RequireRPCPassword())
{ {
unsigned char rand_pwd[32]; unsigned char rand_pwd[32];
GetRandBytes(rand_pwd, 32); GetRandBytes(rand_pwd, 32);

Loading…
Cancel
Save