Permalink
Browse files

Merge pull request #6398

85ee55b rpc: Remove chain-specific RequireRPCPassword (Wladimir J. van der Laan)
  • Loading branch information...
laanwj committed Jul 13, 2015
2 parents 44fa82d + 85ee55b commit 3d9362d5ac1ec405955503dc67caf59e716df5e4
Showing with 1 addition and 7 deletions.
  1. +0 −3 src/chainparams.cpp
  2. +0 −2 src/chainparams.h
  3. +1 −2 src/rpcserver.cpp
View
@@ -98,7 +98,6 @@ class CMainParams : public CChainParams {
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
- fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
@@ -169,7 +168,6 @@ class CTestNetParams : public CMainParams {
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
- fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = false;
@@ -215,7 +213,6 @@ class CRegTestParams : public CTestNetParams {
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.
- fRequireRPCPassword = false;
fMiningRequiresPeers = false;
fDefaultConsistencyChecks = true;
fRequireStandard = false;
View
@@ -51,7 +51,6 @@ class CChainParams
int GetDefaultPort() const { return nDefaultPort; }
const CBlock& GenesisBlock() const { return genesis; }
- bool RequireRPCPassword() const { return fRequireRPCPassword; }
/** Make miner wait to have peers to avoid wasting work */
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
/** Default value for -checkmempool and -checkblockindex argument */
@@ -83,7 +82,6 @@ class CChainParams
std::string strNetworkID;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
- bool fRequireRPCPassword;
bool fMiningRequiresPeers;
bool fDefaultConsistencyChecks;
bool fRequireStandard;
View
@@ -598,8 +598,7 @@ void StartRPCThreads()
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"] == "")
{
unsigned char rand_pwd[32];
GetRandBytes(rand_pwd, 32);

0 comments on commit 3d9362d

Please sign in to comment.