Skip to content

Commit

Permalink
Merge pull request #6398
Browse files Browse the repository at this point in the history
85ee55b rpc: Remove chain-specific RequireRPCPassword (Wladimir J. van der Laan)
  • Loading branch information
laanwj committed Jul 13, 2015
2 parents 44fa82d + 85ee55b commit 3d9362d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -83,7 +82,6 @@ class CChainParams
std::string strNetworkID;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
bool fRequireRPCPassword;
bool fMiningRequiresPeers;
bool fDefaultConsistencyChecks;
bool fRequireStandard;
Expand Down
3 changes: 1 addition & 2 deletions src/rpcserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3d9362d

Please sign in to comment.