mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Add RPCisTestNet chain parameter
This commit is contained in:
parent
cfeb8235fd
commit
6fc0fa63d9
@ -227,6 +227,7 @@ public:
|
|||||||
|
|
||||||
virtual bool AllowMinDifficultyBlocks() const { return true; }
|
virtual bool AllowMinDifficultyBlocks() const { return true; }
|
||||||
virtual bool RequireStandard() const { return false; }
|
virtual bool RequireStandard() const { return false; }
|
||||||
|
virtual bool RPCisTestNet() const { return true; }
|
||||||
virtual Network NetworkID() const { return CChainParams::TESTNET; }
|
virtual Network NetworkID() const { return CChainParams::TESTNET; }
|
||||||
};
|
};
|
||||||
static CTestNetParams testNetParams;
|
static CTestNetParams testNetParams;
|
||||||
|
@ -74,6 +74,8 @@ public:
|
|||||||
virtual bool AllowMinDifficultyBlocks() const { return false; }
|
virtual bool AllowMinDifficultyBlocks() const { return false; }
|
||||||
/* Make standard checks */
|
/* Make standard checks */
|
||||||
virtual bool RequireStandard() const { return true; }
|
virtual bool RequireStandard() const { return true; }
|
||||||
|
/* Make standard checks */
|
||||||
|
virtual bool RPCisTestNet() const { return false; }
|
||||||
const string& DataDir() const { return strDataDir; }
|
const string& DataDir() const { return strDataDir; }
|
||||||
/* Make miner stop after a block is found. In RPC, don't return
|
/* Make miner stop after a block is found. In RPC, don't return
|
||||||
* until nGenProcLimit blocks are generated */
|
* 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("genproclimit", (int)GetArg("-genproclimit", -1)));
|
||||||
obj.push_back(Pair("networkhashps", getnetworkhashps(params, false)));
|
obj.push_back(Pair("networkhashps", getnetworkhashps(params, false)));
|
||||||
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
|
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
|
#ifdef ENABLE_WALLET
|
||||||
obj.push_back(Pair("generate", getgenerate(params, false)));
|
obj.push_back(Pair("generate", getgenerate(params, false)));
|
||||||
obj.push_back(Pair("hashespersec", gethashespersec(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("connections", (int)vNodes.size()));
|
||||||
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
|
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
|
||||||
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
|
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
|
||||||
obj.push_back(Pair("testnet", TestNet()));
|
obj.push_back(Pair("testnet", Params().RPCisTestNet()));
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
if (pwalletMain) {
|
if (pwalletMain) {
|
||||||
obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
|
obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
|
||||||
|
Loading…
Reference in New Issue
Block a user