Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve handling of spv resync edge case #3821
If a trader has a pending trade with an unconfirmed tx and is doing a spv resync, the deposit tx is not found. They get displayed a popup asking to restart and if problem continues to move trade to failed trades. In regtest testing the missing deposit tx was always received from the network at a restart. So this commit adds another button as default button to shut down Bisq so that the user do first that activity instead of moving the trade to failed trades. It is not guaranteed that the trader will receive the missing deposit tx at restart, but at least it is better as the state before. We should find a way how to distinguish a valid unconfirmed tx from an invalid one but it is not clear yet how we can do that and if it is feasible with doing that with BitcoinJ only. It might require a external service to look up the tx if it is in the mem pool, but even that will never gie a 100% certainty.
@m52go Could you have a look to that popup text and improve it if needed?
sqrrm left a comment
This will likely lead to fewer trades moved to failed trades when they shouldn't be.
A point on invalid txs; some txs, such as those with 0 miner fee, are valid and could be mined. It's just very unlikely that they would be. In Bisq's case it's clear they won't be mined, but in the case when fees go up and bitcoin nodes with the default mempool size kick low fee txs out but other nodes with larger mempools keep them it's not quite clear which txs are going to confirm later and which won't.