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

GUI sometimes shows "Not staking because you don't have mature coins" wrongly #188

Closed
dooglus opened this issue May 16, 2015 · 0 comments
Closed

Comments

@dooglus
Copy link
Collaborator

dooglus commented May 16, 2015

I've heard reports from a couple of people that their staking icon goes red after an output stakes, even though they have multiple other mature outputs.

It seems the trouble is that in qt/bitcoingui.cpp, updateWeight() only updates nWeight if the wallet lock isn't currently held. Sometimes it is held, and so nWeight is left as it was before.

After calling updateWeight, updateStakingIcon() does this:

    nWeight /= COIN;

if the wallet lock is held, that division will be done twice, turning any number of CLAMs into 0, and making the "no mature coins" message show up.

The solution is to use a local variable for the result of the division.

I'll make a pull request for it.

dooglus added a commit that referenced this issue May 16, 2015
Don't keep dividing our staking weight by COIN. Fixes #188.
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

1 participant