mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
net|rpc: getpeerinfo - Add verified_pubkey_hash, fix a typo in verified_proregtx_hash docs (#3929)
* net|rpc: Add verified_pubkey_hash in getpeerinfo for MN connections * Apply suggestions from code review Co-authored-by: thephez <thephez@users.noreply.github.com> * rpc: One more typo Co-authored-by: thephez <thephez@users.noreply.github.com>
This commit is contained in:
parent
ec1281c7ad
commit
0c1a02be2c
@ -820,6 +820,7 @@ void CNode::copyStats(CNodeStats &stats)
|
||||
{
|
||||
LOCK(cs_mnauth);
|
||||
X(verifiedProRegTxHash);
|
||||
X(verifiedPubKeyHash);
|
||||
}
|
||||
X(m_masternode_connection);
|
||||
}
|
||||
|
@ -773,6 +773,8 @@ public:
|
||||
CAddress addrBind;
|
||||
// In case this is a verified MN, this value is the proTx of the MN
|
||||
uint256 verifiedProRegTxHash;
|
||||
// In case this is a verified MN, this value is the hashed operator pubkey of the MN
|
||||
uint256 verifiedPubKeyHash;
|
||||
bool m_masternode_connection;
|
||||
};
|
||||
|
||||
|
@ -81,8 +81,11 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
" \"addrlocal\":\"ip:port\", (string) Local address as reported by the peer\n"
|
||||
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
|
||||
" \"verified_proregtx_hash\": h, (hex) Only present when the peer is a masternode and succesfully\n"
|
||||
" autheticated via MNAUTH. In this case, this field contains the\n"
|
||||
" authenticated via MNAUTH. In this case, this field contains the\n"
|
||||
" protx hash of the masternode\n"
|
||||
" \"verified_pubkey_hash\": h, (hex) Only present when the peer is a masternode and succesfully\n"
|
||||
" authenticated via MNAUTH. In this case, this field contains the\n"
|
||||
" hash of the masternode's operator public key\n"
|
||||
" \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n"
|
||||
" \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n"
|
||||
" \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n"
|
||||
@ -145,6 +148,9 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
if (!stats.verifiedProRegTxHash.IsNull()) {
|
||||
obj.pushKV("verified_proregtx_hash", stats.verifiedProRegTxHash.ToString());
|
||||
}
|
||||
if (!stats.verifiedPubKeyHash.IsNull()) {
|
||||
obj.pushKV("verified_pubkey_hash", stats.verifiedPubKeyHash.ToString());
|
||||
}
|
||||
obj.pushKV("relaytxes", stats.fRelayTxes);
|
||||
obj.pushKV("lastsend", stats.nLastSend);
|
||||
obj.pushKV("lastrecv", stats.nLastRecv);
|
||||
|
Loading…
Reference in New Issue
Block a user