Open Scalextrix opened 6 years ago
Result is not wrong, though I am considering including 'wallet is locked' in errors. This behavior is consistent and standard for staking coins.
"staking" is congruent with the green arrow in the UI client. While it might be worth including the reason in "errors" to match the tooltip in the UI when it is not staking, the functionality of 'enabled' is necessary for server operators to know for certain that staking has or has not been disabled on their server - regardless of whether or not the wallet is currently locked.
Other coins I run in CLI staking arent all consistent, some do use "enabled" : false to signify the wallet locked, others use the "errors" : "" to deliver a message. One or the other would be fine, thanks.
Fair enough.
Fwiw, I just know the decision was standard a few years ago when I was working on coins. The reason is that for many server types (exchanges, pools, etc.) it is important to know that staking is disabled before unlocking the wallet.
On the v2.1.0.4 SpockySpock version, when using the headless version on Linux, calling the RPC getstakinginfo returns
Even if the wallet is fully locked, "enabled" : true still shows, this leads to confusion if a user is in CLI only and is trying to understand why "staking" : false.