Add RPCisTestNet chain parameter
This commit is contained in:
parent
cfeb8235fd
commit
6fc0fa63d9
4 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue