Skip to content

Commit ae6f3d7

Browse files
committed
Remove legacy "upgradedbeaconreport" RPC command
1 parent 8a67941 commit ae6f3d7

File tree

3 files changed

+0
-46
lines changed

3 files changed

+0
-46
lines changed

src/rpcblockchain.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ extern std::string YesNo(bool bin);
3131
extern double DoubleFromAmount(int64_t amount);
3232
bool AskForOutstandingBlocks(uint256 hashStart);
3333
bool ForceReorganizeToHash(uint256 NewHash);
34-
extern UniValue GetUpgradedBeaconReport();
3534
extern UniValue MagnitudeReport(const NN::Cpid cpid);
3635
extern std::string ExtractValue(std::string data, std::string delimiter, int pos);
3736
extern UniValue SuperblockReport(int lookback = 14, bool displaycontract = false, std::string cpid = "");
@@ -1106,21 +1105,6 @@ UniValue superblocks(const UniValue& params, bool fHelp)
11061105
return res;
11071106
}
11081107

1109-
UniValue upgradedbeaconreport(const UniValue& params, bool fHelp)
1110-
{
1111-
if (fHelp || params.size() != 0)
1112-
throw runtime_error(
1113-
"upgradedbeaconreport\n"
1114-
"\n"
1115-
"Display upgraded beacon report of the network\n");
1116-
1117-
LOCK(cs_main);
1118-
1119-
UniValue aUpgBR = GetUpgradedBeaconReport();
1120-
1121-
return aUpgBR;
1122-
}
1123-
11241108
UniValue addkey(const UniValue& params, bool fHelp)
11251109
{
11261110
if (fHelp || params.size() != 4)
@@ -1940,34 +1924,6 @@ double DoubleFromAmount(int64_t amount)
19401924
return (double)amount / (double)COIN;
19411925
}
19421926

1943-
UniValue GetUpgradedBeaconReport()
1944-
{
1945-
UniValue results(UniValue::VARR);
1946-
UniValue entry(UniValue::VOBJ);
1947-
entry.pushKV("Report","Upgraded Beacon Report 1.0");
1948-
std::string rows = "";
1949-
std::string row = "";
1950-
int iBeaconCount = 0;
1951-
int iUpgradedBeaconCount = 0;
1952-
for(const auto& item : ReadSortedCacheSection(Section::BEACON))
1953-
{
1954-
const AppCacheEntry& entry = item.second;
1955-
std::string contract = DecodeBase64(entry.value);
1956-
std::string cpidv2 = ExtractValue(contract,";",0);
1957-
std::string grcaddress = ExtractValue(contract,";",2);
1958-
std::string sPublicKey = ExtractValue(contract,";",3);
1959-
if (!sPublicKey.empty()) iUpgradedBeaconCount++;
1960-
iBeaconCount++;
1961-
}
1962-
1963-
entry.pushKV("Total Beacons", iBeaconCount);
1964-
entry.pushKV("Upgraded Beacon Count", iUpgradedBeaconCount);
1965-
double dPct = ((double)iUpgradedBeaconCount / ((double)iBeaconCount) + .01);
1966-
entry.pushKV("Pct Of Upgraded Beacons",RoundToString(dPct*100,3));
1967-
results.push_back(entry);
1968-
return results;
1969-
}
1970-
19711927
UniValue GetJSONBeaconReport()
19721928
{
19731929
UniValue results(UniValue::VARR);

src/rpcserver.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ static const CRPCCommand vRPCCommands[] =
352352
{ "staketime", &staketime, cat_mining },
353353
{ "superblockage", &superblockage, cat_mining },
354354
{ "superblocks", &superblocks, cat_mining },
355-
{ "upgradedbeaconreport", &upgradedbeaconreport, cat_mining },
356355

357356
// Developer commands
358357
{ "addkey", &addkey, cat_developer },

src/rpcserver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ extern UniValue resetcpids(const UniValue& params, bool fHelp);
170170
extern UniValue staketime(const UniValue& params, bool fHelp);
171171
extern UniValue superblockage(const UniValue& params, bool fHelp);
172172
extern UniValue superblocks(const UniValue& params, bool fHelp);
173-
extern UniValue upgradedbeaconreport(const UniValue& params, bool fHelp);
174173

175174
// Developers
176175
extern UniValue addkey(const UniValue& params, bool fHelp);

0 commit comments

Comments
 (0)