-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Don't allow trade start if BitcoinJ is not fully synced #4764
Conversation
This comment has been minimized.
This comment has been minimized.
@jmacxx Thanks for picking that up! Have you seen the recent changes I did for the footer to show the latest BTC block? Not sure if that can help for the popup msg... I think its merged in master... The Network info label for chain height might be too technical (Peer group). I think it should be enough to apply it only to the trade use case. Until now we never had it and only with the introduction of the locktime we got an issue with not being on the latest block. |
Ahh, I had not seen your PR for putting chainHeight in the footer, it is not yet merged. What I've noticed is that chainHeight property is 0 until the first new block comes in after startup which can be a 10, 20, or 30 minutes wait. Perhaps it should be initialized; I'll remove the label in network settings and rework this PR as you suggested, thanks. |
Oh, yes that should be fixed. Feel free to add a fix for that. |
Maybe its good to have it there, just a bit less technical label... something like "Latest BTC block height" |
I've made the changes above - in addition any open orders will also be prevented from being taken in the error case where chain is out of sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Adds a check that chain height is within 3 blocks of the reported height from bitcoin peers -> if not the user cannot take an offer or have an existing offer taken. It shows a message informing the user that Bisq is not currently synced, advising them to do an SPV resync if necessary. Additionally under Settings/Network a field has been added to show the chain height of Bisq vs the Peer group. Added after discussion with chimp1984: - Correct initialization of chainHeight property - Rename "Latest BTC block height" display field for clarity - Enforce chain sync rule for Take Offer scenario - Enforce chain synch rule for Check offer availability scenario - change method name to be clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Adds a check that if chain height is more than 3 blocks of the reported height from bitcoin peers -> it is considered a serious error and the user is prevented from taking or creating an offer, also any open orders are prevented from being taken as it would cause a protocol error.
It displays a popup message informing the user that Bisq is not currently synced, advising them to wait for one Bitcoin block and if necessary to do an SPV resync.
Additionally under Settings/Network, a field has been added to show the chain height of Bisq vs the Peer group.
Fixes: #4727
Fixes: #4707
Screenshots
Network info showing chain height:
Logged upon attempting to take or create offer when not synced: