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

Locked balance doesn't always get updated #2305

Open
a123b opened this issue Jan 22, 2019 · 6 comments
Open

Locked balance doesn't always get updated #2305

a123b opened this issue Jan 22, 2019 · 6 comments

Comments

@a123b
Copy link
Contributor

a123b commented Jan 22, 2019

When you are the maker of a trade and your offer gets accepted, the reserved funds are locked in a multisig address. This is correctly reflected in the "Locked Funds" tab. In the summary at the top right of the app, however, this doesn't always seem to be the case. I noticed many times now that it shows "0.00 BTC locked" even though there are locked funds. It only gets updated to the actual locked value after restarting the app.

@ghost
Copy link

ghost commented Jan 22, 2019

Thanks for the return !

@ripcurlx
Copy link
Member

@a123b When you experience this problem does the reserved balance not update as well or is just the locked balance displayed wrong?

@ripcurlx
Copy link
Member

When this issue is occuring, could you try (if you have another own offer available) to disable and enable the offer to see if the balance updates afterwards correctly? Changing the open offer list, should also trigger the update of all balances. I just want to make sure, that the problem lies in a listener not being triggered or if it's something else.

@ripcurlx
Copy link
Member

Just from a code point of view the locked funds tab and the locked balance get their data from the same source. The only difference is, that the locked balance sums up the balance of failed, closed and locked trades. But as you didn't get an exception when you have this issue, I don't think there is an issue in the sum up code. Also just to rule out a general JavaFx rendering issue: when you experience this problem try to click somewhere else on your desktop and select afterwards the Bisq app again to force a change of focus, which triggers a redraw within the JavaFX render pipeline.

@a123b
Copy link
Contributor Author

a123b commented Jan 25, 2019

The reserved balance correctly updated to 0.00 when the trade was accepted. (That's why I noticed the bug, I saw that 0.01 BTC seemed to suddenly have disappeared...)
I don't think it was a rendering issue, I minimized, switched windows, moved the Bisq window quite a few times over a period of at least a day.

The summing code can't be the issue as the balance is correct after a restart. Unfortunately, I very rarely have multiple offers open at the same time, so I can't test if it gets updated after disabling/enabling offers.

If all balances are always updated at the same time, I could imagine that this is some kind of race condition: The update is triggered after the offer is accepted, so the balance isn't reserved anymore, but at this point the multisig doesn't show in the "Locked Funds" tab yet because the transaction isn't broadcast or confirmed yet.
Could it be something like this?

@ripcurlx
Copy link
Member

@a123b Thanks for the additional info. Probably it might be something like this, but I have to look into it more deeply as all this different state changes also trigger a full balance update. I'll keep you posted.

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

No branches or pull requests

2 participants