Browse Source

Add fTestnetToBeDeprecatedFieldRPC to CChainParams

tags/v0.15.1
jtimon 6 years ago
parent
commit
cc97210799
4 changed files with 8 additions and 2 deletions
  1. 3
    0
      src/chainparams.cpp
  2. 3
    0
      src/chainparams.h
  3. 1
    1
      src/rpcmining.cpp
  4. 1
    1
      src/rpcmisc.cpp

+ 3
- 0
src/chainparams.cpp View File

@@ -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
{

+ 3
- 0
src/chainparams.h View File

@@ -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

+ 1
- 1
src/rpcmining.cpp View File

@@ -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)));

+ 1
- 1
src/rpcmisc.cpp View File

@@ -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…
Cancel
Save