message: [RPC] getstakingstatus: add stakesplitthreshold and coldstaking_enabled
diff: @@ -592,13 +592,15 @@ UniValue getstakingstatus(const UniValue& params, bool fHelp)
  "\nResult:\n"
  "{\n"
  - " \"staking_status\": true|false, (boolean) if the wallet is staking or not\n"
  - " \"staking_enabled\": true|false, (boolean) if staking is enabled/disabled in pivx.conf\n"
  - " \"haveconnections\": true|false, (boolean) if network connections are present\n"
  - " \"mnsync\": true|false, (boolean) if masternode data is synced\n"
  - " \"walletunlocked\": true|false, (boolean) if the wallet is unlocked\n"
  + " \"staking_status\": true|false, (boolean) whether the wallet is staking or not\n"
  + " \"staking_enabled\": true|false, (boolean) whether staking is enabled/disabled in pivx.conf\n"
  + " \"coldstaking_enabled\": true|false, (boolean) whether cold-staking is enabled/disabled in pivx.conf\n"
  + " \"haveconnections\": true|false, (boolean) whether network connections are present\n"
  + " \"mnsync\": true|false, (boolean) whether masternode data is synced\n"
  + " \"walletunlocked\": true|false, (boolean) whether the wallet is unlocked\n"
  " \"stakeablecoins\": n (numeric) number of stakeable UTXOs\n"
  " \"stakingbalance\": d (numeric) PIV value of the stakeable coins (minus reserve balance, if any)\n"
  + " \"stakesplitthreshold\": d (numeric) value of the current threshold for stake split\n"
  " \"lastattempt_age\": n (numeric) seconds since last stake attempt\n"
  " \"lastattempt_depth\": n (numeric) depth of the block on top of which the last stake attempt was made\n"
  " \"lastattempt_hash\": xxx (hex string) hash of the block on top of which the last stake attempt was made\n"
  @@ -617,14 +619,16 @@ UniValue getstakingstatus(const UniValue& params, bool fHelp)
  UniValue obj(UniValue::VOBJ);
  obj.push_back(Pair("staking_status", pwalletMain->pStakerStatus->IsActive()));
  obj.push_back(Pair("staking_enabled", GetBoolArg("-staking", true)));
  + bool fColdStaking = GetBoolArg("-coldstaking", true);
  + obj.push_back(Pair("coldstaking_enabled", fColdStaking));
  obj.push_back(Pair("haveconnections", !vNodes.empty()));
  obj.push_back(Pair("mnsync", masternodeSync.IsSynced()));
  obj.push_back(Pair("walletunlocked", !pwalletMain->IsLocked()));
  std::vector<COutput> vCoins;
  pwalletMain->StakeableCoins(&vCoins);
  obj.push_back(Pair("stakeablecoins", (int)vCoins.size()));
  - obj.push_back(Pair("stakingbalance", ValueFromAmount(
  - pwalletMain->GetStakingBalance(GetBoolArg("-coldstaking", true)))));
  + obj.push_back(Pair("stakingbalance", ValueFromAmount(pwalletMain->GetStakingBalance(fColdStaking))));
  + obj.push_back(Pair("stakesplitthreshold", ValueFromAmount(pwalletMain->nStakeSplitThreshold)));
  CStakerStatus* ss = pwalletMain->pStakerStatus;
  if (ss) {
  obj.push_back(Pair("lastattempt_age", (int)(GetTime() - ss->GetLastTime())));
  