Browse Source

rpc: Remove chain-specific RequireRPCPassword

I've never liked the chain-specific exception to having to set a
password. It gives issues with #6388 which makes it valid to
set no password in every case (as it enables random cookie authentication).

This pull removes the flag, so that all chains are regarded the same.

It also removes the username==password test, which doesn't provide any
substantial extra security.
pull/4/head
Wladimir J. van der Laan 9 years ago
committed by Jack Grigg
parent
commit
ce83df8fc4
No known key found for this signature in database GPG Key ID: 6A6914DAFBEA00DA
  1. 3
      src/chainparams.cpp
  2. 2
      src/chainparams.h

3
src/chainparams.cpp

@ -117,7 +117,6 @@ public:
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
@ -251,7 +250,6 @@ public:
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
@ -328,7 +326,6 @@ public:
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;

2
src/chainparams.h

@ -56,7 +56,6 @@ public:
/** Used if GenerateBitcoins is called with a negative number of threads */
int DefaultMinerThreads() const { return nMinerThreads; }
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 */
@ -103,7 +102,6 @@ protected:
std::string strCurrencyUnits;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
bool fRequireRPCPassword = false;
bool fMiningRequiresPeers = false;
bool fDefaultConsistencyChecks = false;
bool fRequireStandard = false;

Loading…
Cancel
Save