Hello,
I'm currently trying to develop a Masternode monitoring tool but I'm facing a problem I can't actually solve. Most of the MN coins are also PoW or PoS which means that the rewards perceived by the masternode are not 100% of the block rewards. I'm trying trough RPC (wallet debug console) to get that split amout whitout actually having to store it in my database.
Every MN coin has on his website a table showing the rewards through time. Something like that :
Blocks | Rewards |
71401 — 262800 | 20 GIC (4 GIC PoS + 16 GIC MN) |
262801 — 525600 | 10 GIC (2 GIC PoS + 8 GIC MN) |
I want to be able to retrieve those number based on the current block. Or even better, get those directly with an RPC command.
I managed to find the following command
which gives me the following result :
{
"capabilities": [
"proposal"
],
"version": 536870912,
"rules": [
"dip0001"
],
"vbavailable": {
},
"vbrequired": 0,
"previousblockhash": "0000000002336b6cdc1ed91044c5c3ef8edb216d960223e96d9c83f3ee7e5c68",
"transactions": [
],
"coinbaseaux": {
"flags": ""
},
"coinbasevalue": 700000000,
"longpollid": "0000000002336b6cdc1ed91044c5c3ef8edb216d960223e96d9c83f3ee7e5c68348",
"target": "000000000547b700000000000000000000000000000000000000000000000000",
"mintime": 1536085062,
"mutable": [
"time",
"transactions",
"prevblock"
],
"noncerange": "00000000ffffffff",
"sigoplimit": 40000,
"sizelimit": 2000000,
"curtime": 1536085594,
"bits": "1c0547b7",
"height": 141766,
"masternode": {
"payee": "GdSyNs5uaKmTQZjZz6XiqXituDxFd78HVq",
"script": "76a914d70b6b963e602eed6d028e51f55a15f5aa859e3d88ac",
"amount": 383250000
},
"masternode_payments_started": true,
"masternode_payments_enforced": false,
"superblock": [
],
"superblocks_started": false,
"superblocks_enabled": false
}
Which is perfect as I can look the current MN reward in masternode -> amount. But this command only works on a very few coins and for the vast majority of other coins, I get the following result :
error: {"code":-7,"message":"Out of memory"}
Is there an other command to retrieve that information or do I have to store the rewards structure in my database ? (Which is not ideal because a lot of coins are changing their structure down the road)