mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Show penalty score in masternode rpc (#4751)
* Show penalty score in masternode rpc * Added documentation
This commit is contained in:
parent
d7bf68d02d
commit
6313374bbd
3
doc/release-notes-4751.md
Normal file
3
doc/release-notes-4751.md
Normal file
@ -0,0 +1,3 @@
|
||||
Miscellaneous RPC Changes
|
||||
-------------------------
|
||||
- In rpc `masternodelist` with parameters `full`, `info` and `json` the PoS penalty score of the MN will be returned. For `json` parameter, the field `pospenaltyscore` was added.
|
@ -637,6 +637,7 @@ static UniValue masternodelist(const JSONRPCRequest& request)
|
||||
std::ostringstream streamFull;
|
||||
streamFull << std::setw(18) <<
|
||||
dmnToStatus(dmn) << " " <<
|
||||
dmn.pdmnState->nPoSePenalty << " " <<
|
||||
payeeStr << " " << std::setw(10) <<
|
||||
dmnToLastPaidTime(dmn) << " " << std::setw(6) <<
|
||||
dmn.pdmnState->nLastPaidHeight << " " <<
|
||||
@ -649,6 +650,7 @@ static UniValue masternodelist(const JSONRPCRequest& request)
|
||||
std::ostringstream streamInfo;
|
||||
streamInfo << std::setw(18) <<
|
||||
dmnToStatus(dmn) << " " <<
|
||||
dmn.pdmnState->nPoSePenalty << " " <<
|
||||
payeeStr << " " <<
|
||||
dmn.pdmnState->addr.ToString();
|
||||
std::string strInfo = streamInfo.str();
|
||||
@ -661,6 +663,7 @@ static UniValue masternodelist(const JSONRPCRequest& request)
|
||||
dmn.pdmnState->addr.ToString() << " " <<
|
||||
payeeStr << " " <<
|
||||
dmnToStatus(dmn) << " " <<
|
||||
dmn.pdmnState->nPoSePenalty << " " <<
|
||||
dmnToLastPaidTime(dmn) << " " <<
|
||||
dmn.pdmnState->nLastPaidHeight << " " <<
|
||||
EncodeDestination(dmn.pdmnState->keyIDOwner) << " " <<
|
||||
@ -675,6 +678,7 @@ static UniValue masternodelist(const JSONRPCRequest& request)
|
||||
objMN.pushKV("address", dmn.pdmnState->addr.ToString());
|
||||
objMN.pushKV("payee", payeeStr);
|
||||
objMN.pushKV("status", dmnToStatus(dmn));
|
||||
objMN.pushKV("pospenaltyscore", dmn.pdmnState->nPoSePenalty);
|
||||
objMN.pushKV("lastpaidtime", dmnToLastPaidTime(dmn));
|
||||
objMN.pushKV("lastpaidblock", dmn.pdmnState->nLastPaidHeight);
|
||||
objMN.pushKV("owneraddress", EncodeDestination(dmn.pdmnState->keyIDOwner));
|
||||
|
Loading…
Reference in New Issue
Block a user