-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a masternode return of investment RPC #2933
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. The code needs to be formatted and redundant comments cleaned up.
I'm not sure if this RPC is actually needed, It seems like something a third party tool like toolbox.pivx.org would provide, rather than the core wallet.
return csra.pb->GetBlockTime() - csra.pb0->GetBlockTime(); | ||
} | ||
|
||
// returns count enabled or zero on error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// returns count enabled or zero on error | |
// returns count enabled or zero on error |
This says it will return zero on error, but later it returns negative numbers on error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see line 76
I think that this kind of functionality is better suited to a website and not the core wallet. this introduces features that are not reasonably tested in a meaningful way (code coverage / regression tests). |
update PR #2929 to current "master" branch
accurate CLI function for staking and masternode ROI
getroi
{
"3 hour avg ROI": "23.9%",
"30 min stk ROI": "29.5%",
"network stake": "8,564,072",
"--------------": "--------------",
"masternode ROI": "16.0%",
"tot collateral": "19,150,000",
"enabled nodes": "1915",
"blocks per day": "1401.1"
}