Skip to content

getstakinginfo output is wrong when wallet is locked #6

Open

Description

@Scalextrix

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.

Activity

  1. PinkDev commented on May 25, 2018

    @PinkDev
    Contributor

    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.

  2. Scalextrix commented on May 25, 2018

    @Scalextrix
    ContributorAuthor

    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.

  3. PinkDev commented on May 25, 2018

    @PinkDev
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions