Remove support for "masternode list rank"
This commit is contained in:
parent
adc2ec2253
commit
0fe97a0459
@ -816,7 +816,7 @@ UniValue masternodelist(const JSONRPCRequest& request)
|
||||
strMode != "addr" && strMode != "full" && strMode != "info" && strMode != "json" &&
|
||||
strMode != "lastpaidtime" && strMode != "lastpaidblock" &&
|
||||
strMode != "payee" && strMode != "pubkey" &&
|
||||
strMode != "rank" && strMode != "status"))
|
||||
strMode != "status"))
|
||||
{
|
||||
masternode_list_help();
|
||||
}
|
||||
@ -831,22 +831,13 @@ UniValue masternodelist(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
if (strMode == "rank") {
|
||||
CMasternodeMan::rank_pair_vec_t vMasternodeRanks;
|
||||
mnodeman.GetMasternodeRanks(vMasternodeRanks);
|
||||
for (const auto& rankpair : vMasternodeRanks) {
|
||||
std::string strOutpoint = rankpair.second.outpoint.ToStringShort();
|
||||
if (strFilter !="" && strOutpoint.find(strFilter) == std::string::npos) continue;
|
||||
obj.push_back(Pair(strOutpoint, rankpair.first));
|
||||
}
|
||||
} else {
|
||||
std::map<COutPoint, CMasternode> mapMasternodes = mnodeman.GetFullMasternodeMap();
|
||||
for (const auto& mnpair : mapMasternodes) {
|
||||
CMasternode mn = mnpair.second;
|
||||
std::string strOutpoint = mnpair.first.ToStringShort();
|
||||
|
||||
CScript payeeScript;
|
||||
if (deterministicMNManager->IsDIP3Active()) {
|
||||
if (deterministicMNManager->IsDeterministicMNsSporkActive()) {
|
||||
auto dmn = deterministicMNManager->GetListAtChainTip().GetMNByCollateral(mn.outpoint);
|
||||
if (dmn) {
|
||||
payeeScript = dmn->pdmnState->scriptPayout;
|
||||
@ -931,7 +922,7 @@ UniValue masternodelist(const JSONRPCRequest& request)
|
||||
obj.push_back(Pair(strOutpoint, strStatus));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user