-
Notifications
You must be signed in to change notification settings - Fork 36.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
wallet: Ignore MarkConflict if block hash is not known #7491
wallet: Ignore MarkConflict if block hash is not known #7491
Conversation
If number of conflict confirms cannot be determined, this means that the block is still unknown or not yet part of the main chain, for example during a reindex. Do nothing in that case, instead of crash with an assertion. Fixes bitcoin#7234.
utACK |
utACK |
@sipa Why is it necessary to have the call to MarkConflicted from the fFromLoadWallet code block in the first place? I assume that's the call site that causes this problem? OK Thanks for the answer on IRC. It's for backwards compatibility so conflict information is created (to the extent possible) for pre-0.12 wallets. |
Yes (the other callsite should never hit this, as it is called with a block that has just become the new tip). |
utACK |
ACK laanwj@40e7b61 |
40e7b61 wallet: Ignore MarkConflict if block hash is not known (Wladimir J. van der Laan)
Cherry-picked to 0.12 as 00ec73e |
f90fa08 wallet: Ignore MarkConflict if block hash is not known (random-zebra) Pull request description: backports bitcoin#7491 > If number of conflict confirms cannot be determined, this means that the block is still unknown or not yet part of the main chain, for example during a reindex. Do nothing in that case, instead of crash with an assertion. > > Fixes bitcoin#7234. ACKs for top commit: furszy: ACK f90fa08 + added "needs back port" label for 4.2.1 . Fuzzbawls: utACK f90fa08 Tree-SHA512: aa37b3802be93ac05e28f89ae2206da3a2a3b78e8a649890d2dd3d2ead06b6aeacf254d221490e6f87dae64bb47cb00db87f3db38e7c9bb4d82ae4d6d85033ec
If number of conflict confirms cannot be determined, this means that the block is still unknown or not yet part of the main chain, for example during a reindex. Do nothing in that case, instead of crash with an assertion failure.
(the block will pass by the wallet again eventually, re-marking the transaction as conflict)
Fixes #7234.