aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chainparams.cpp1
-rw-r--r--src/chainparams.h2
-rw-r--r--src/rpcmining.cpp2
-rw-r--r--src/rpcmisc.cpp2
4 files changed, 5 insertions, 2 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f10599690f..109ee02b0a 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -227,6 +227,7 @@ public:
virtual bool AllowMinDifficultyBlocks() const { return true; }
virtual bool RequireStandard() const { return false; }
+ virtual bool RPCisTestNet() const { return true; }
virtual Network NetworkID() const { return CChainParams::TESTNET; }
};
static CTestNetParams testNetParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index 881eb2294d..3849d33aca 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -74,6 +74,8 @@ public:
virtual bool AllowMinDifficultyBlocks() const { return false; }
/* Make standard checks */
virtual bool RequireStandard() const { return true; }
+ /* Make standard checks */
+ virtual bool RPCisTestNet() const { return false; }
const string& DataDir() const { return strDataDir; }
/* Make miner stop after a block is found. In RPC, don't return
* until nGenProcLimit blocks are generated */
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 70adae1467..edf91023dc 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -265,7 +265,7 @@ Value getmininginfo(const Array& params, bool fHelp)
obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
obj.push_back(Pair("networkhashps", getnetworkhashps(params, false)));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
- obj.push_back(Pair("testnet", TestNet()));
+ obj.push_back(Pair("testnet", Params().RPCisTestNet()));
#ifdef ENABLE_WALLET
obj.push_back(Pair("generate", getgenerate(params, false)));
obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 27d6d61a36..a1793e2e43 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -73,7 +73,7 @@ Value getinfo(const Array& params, bool fHelp)
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
- obj.push_back(Pair("testnet", TestNet()));
+ obj.push_back(Pair("testnet", Params().RPCisTestNet()));
#ifdef ENABLE_WALLET
if (pwalletMain) {
obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));