diff --git a/src/miner.cpp b/src/miner.cpp index 450d7139a4..a7048eefa9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1034,7 +1034,7 @@ bool IsMiningAllowed(CWallet *pwallet) } // This function parses the config file for the directives for side staking. It is used -// in StakeMiner for the miner loop and also called by rpc getmininginfo. +// in StakeMiner for the miner loop and also called by rpc getstakinginfo. SideStakeAlloc GetSideStakingStatusAndAlloc() { SideStakeAlloc vSideStakeAlloc; @@ -1138,7 +1138,7 @@ SideStakeAlloc GetSideStakingStatusAndAlloc() } // This function parses the config file for the directives for stake splitting. It is used -// in StakeMiner for the miner loop and also called by rpc getmininginfo. +// in StakeMiner for the miner loop and also called by rpc getstakinginfo. bool GetStakeSplitStatusAndParams(int64_t& nMinStakeSplitValue, double& dEfficiency, int64_t& nDesiredStakeOutputValue) { // Parse StakeSplit and SideStaking flags. diff --git a/src/qt/researcher/researchermodel.cpp b/src/qt/researcher/researchermodel.cpp index 1fc24eb513..7a76362c8b 100644 --- a/src/qt/researcher/researchermodel.cpp +++ b/src/qt/researcher/researchermodel.cpp @@ -316,7 +316,7 @@ QString ResearcherModel::formatStatus() const return tr("Waiting for sync..."); } - // TODO: The getmininginfo RPC shares this global. Refactor to remove it: + // TODO: The getstakinginfo RPC shares this global. Refactor to remove it: return QString::fromStdString(msMiningErrors); } diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 16b52a1f79..ecc52a05c8 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -20,11 +20,11 @@ using namespace std; -UniValue getmininginfo(const UniValue& params, bool fHelp) +UniValue getstakinginfo(const UniValue& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getmininginfo\n" + "getstakinginfo\n" "\n" "Returns an object containing mining-related information\n"); diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index c9c2115458..9e8d0091dd 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -215,7 +215,7 @@ UniValue help(const UniValue& params, bool fHelp) "\n" "Categories:\n" "wallet --------> Returns help for blockchain related commands\n" - "mining --------> Returns help for staking/cpid/beacon related commands\n" + "staking -------> Returns help for staking/cpid/beacon related commands\n" "developer -----> Returns help for developer commands\n" "network -------> Returns help for network related commands\n" "voting --------> Returns help for voting related commands\n" @@ -236,8 +236,8 @@ UniValue help(const UniValue& params, bool fHelp) if (strCommand == "wallet") category = cat_wallet; - else if (strCommand == "mining") - category = cat_mining; + else if (strCommand == "staking" || strCommand == "mining") + category = cat_staking; else if (strCommand == "developer") category = cat_developer; @@ -348,20 +348,21 @@ static const CRPCCommand vRPCCommands[] = { "walletpassphrasechange", &walletpassphrasechange, cat_wallet }, // Mining commands - { "advertisebeacon", &advertisebeacon, cat_mining }, - { "beaconconvergence", &beaconconvergence, cat_mining }, - { "beaconreport", &beaconreport, cat_mining }, - { "beaconstatus", &beaconstatus, cat_mining }, - { "explainmagnitude", &explainmagnitude, cat_mining }, - { "getlaststake", &getlaststake, cat_mining }, - { "getmininginfo", &getmininginfo, cat_mining }, - { "lifetime", &lifetime, cat_mining }, - { "magnitude", &magnitude, cat_mining }, - { "pendingbeaconreport", &pendingbeaconreport, cat_mining }, - { "resetcpids", &resetcpids, cat_mining }, - { "revokebeacon", &revokebeacon, cat_mining }, - { "superblockage", &superblockage, cat_mining }, - { "superblocks", &superblocks, cat_mining }, + { "advertisebeacon", &advertisebeacon, cat_staking }, + { "beaconconvergence", &beaconconvergence, cat_staking }, + { "beaconreport", &beaconreport, cat_staking }, + { "beaconstatus", &beaconstatus, cat_staking }, + { "explainmagnitude", &explainmagnitude, cat_staking }, + { "getlaststake", &getlaststake, cat_staking }, + { "getstakinginfo", &getstakinginfo, cat_staking }, + { "getmininginfo", &getstakinginfo, cat_staking }, //alias for getstakinginfo (compatibility) + { "lifetime", &lifetime, cat_staking }, + { "magnitude", &magnitude, cat_staking }, + { "pendingbeaconreport", &pendingbeaconreport, cat_staking }, + { "resetcpids", &resetcpids, cat_staking }, + { "revokebeacon", &revokebeacon, cat_staking }, + { "superblockage", &superblockage, cat_staking }, + { "superblocks", &superblocks, cat_staking }, // Developer commands { "auditsnapshotaccrual", &auditsnapshotaccrual, cat_developer }, diff --git a/src/rpc/server.h b/src/rpc/server.h index 3e59ffc0b4..6d709d50d4 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -39,7 +39,7 @@ enum rpccategory { cat_null, cat_wallet, - cat_mining, + cat_staking, cat_developer, cat_network, cat_voting, @@ -170,7 +170,7 @@ extern UniValue beaconconvergence(const UniValue& params, bool fHelp); extern UniValue beaconstatus(const UniValue& params, bool fHelp); extern UniValue explainmagnitude(const UniValue& params, bool fHelp); extern UniValue getlaststake(const UniValue& params, bool fHelp); -extern UniValue getmininginfo(const UniValue& params, bool fHelp); +extern UniValue getstakinginfo(const UniValue& params, bool fHelp); extern UniValue lifetime(const UniValue& params, bool fHelp); extern UniValue magnitude(const UniValue& params, bool fHelp); extern UniValue pendingbeaconreport(const UniValue& params, bool fHelp);