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'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:
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.