diff options
-rw-r--r-- | src/chainparams.cpp | 3 | ||||
-rw-r--r-- | src/chainparams.h | 2 | ||||
-rw-r--r-- | src/rpcserver.cpp | 3 |
3 files changed, 1 insertions, 7 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index cd31f98c59..d693fba05d 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -98,7 +98,6 @@ public: vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); - fRequireRPCPassword = true; fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; fRequireStandard = true; @@ -169,7 +168,6 @@ public: vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); - fRequireRPCPassword = true; fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; fRequireStandard = false; @@ -215,7 +213,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; diff --git a/src/chainparams.h b/src/chainparams.h index c10d6d6467..66d865b620 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -51,7 +51,6 @@ public: 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 @@ protected: std::string strNetworkID; CBlock genesis; std::vector<SeedSpec6> vFixedSeeds; - bool fRequireRPCPassword; bool fMiningRequiresPeers; bool fDefaultConsistencyChecks; bool fRequireStandard; diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index aeb51fed56..8f5ff10a80 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -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); |