Add fTestnetToBeDeprecatedFieldRPC to CChainParams
This commit is contained in:
parent
e11712df7e
commit
cc97210799
4 changed files with 8 additions and 2 deletions
|
@ -167,6 +167,7 @@ public:
|
|||
fRequireStandard = true;
|
||||
fMineBlocksOnDemand = false;
|
||||
fSkipProofOfWorkCheck = false;
|
||||
fTestnetToBeDeprecatedFieldRPC = false;
|
||||
}
|
||||
|
||||
const Checkpoints::CCheckpointData& Checkpoints() const
|
||||
|
@ -228,6 +229,7 @@ public:
|
|||
fAllowMinDifficultyBlocks = true;
|
||||
fRequireStandard = false;
|
||||
fMineBlocksOnDemand = false;
|
||||
fTestnetToBeDeprecatedFieldRPC = true;
|
||||
}
|
||||
const Checkpoints::CCheckpointData& Checkpoints() const
|
||||
{
|
||||
|
@ -271,6 +273,7 @@ public:
|
|||
fAllowMinDifficultyBlocks = true;
|
||||
fRequireStandard = false;
|
||||
fMineBlocksOnDemand = true;
|
||||
fTestnetToBeDeprecatedFieldRPC = false;
|
||||
}
|
||||
const Checkpoints::CCheckpointData& Checkpoints() const
|
||||
{
|
||||
|
|
|
@ -72,6 +72,8 @@ public:
|
|||
/* Make miner stop after a block is found. In RPC, don't return
|
||||
* until nGenProcLimit blocks are generated */
|
||||
bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
|
||||
/* In the future use NetworkIDString() for RPC fields */
|
||||
bool TestnetToBeDeprecatedFieldRPC() const { return fTestnetToBeDeprecatedFieldRPC; }
|
||||
CBaseChainParams::Network NetworkID() const { return networkID; }
|
||||
/* Return the BIP70 network string (main, test or regtest) */
|
||||
std::string NetworkIDString() const { return strNetworkID; }
|
||||
|
@ -108,6 +110,7 @@ protected:
|
|||
bool fRequireStandard;
|
||||
bool fMineBlocksOnDemand;
|
||||
bool fSkipProofOfWorkCheck;
|
||||
bool fTestnetToBeDeprecatedFieldRPC;
|
||||
};
|
||||
|
||||
/** Modifiable parameters interface is used by test cases to adapt the parameters in order
|
||||
|
|
|
@ -239,7 +239,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", Params().NetworkID() == CBaseChainParams::TESTNET));
|
||||
obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC()));
|
||||
obj.push_back(Pair("chain", Params().NetworkIDString()));
|
||||
#ifdef ENABLE_WALLET
|
||||
obj.push_back(Pair("generate", getgenerate(params, false)));
|
||||
|
|
|
@ -87,7 +87,7 @@ Value getinfo(const Array& params, bool fHelp)
|
|||
obj.push_back(Pair("connections", (int)vNodes.size()));
|
||||
obj.push_back(Pair("proxy", (proxy.IsValid() ? proxy.ToStringIPPort() : string())));
|
||||
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
|
||||
obj.push_back(Pair("testnet", Params().NetworkID() == CBaseChainParams::TESTNET));
|
||||
obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC()));
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain) {
|
||||
obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
|
||||
|
|
Loading…
Reference in a new issue