Skip to content
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

getstakinginfo output is wrong when wallet is locked #6

Open
Scalextrix opened this issue May 25, 2018 · 3 comments
Open

getstakinginfo output is wrong when wallet is locked #6

Scalextrix opened this issue May 25, 2018 · 3 comments

Comments

@Scalextrix
Copy link
Contributor

On the v2.1.0.4 SpockySpock version, when using the headless version on Linux, calling the RPC getstakinginfo returns

{
"enabled" : true,
"staking" : false,
"errors" : "",
...
}

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.

@PinkDev
Copy link
Contributor

PinkDev commented May 25, 2018

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.

@Scalextrix
Copy link
Contributor Author

Scalextrix commented May 25, 2018

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.

@PinkDev
Copy link
Contributor

PinkDev commented May 25, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants