wallet: Ignore MarkConflict if block hash is not known#7491
Merged
laanwj merged 1 commit intobitcoin:masterfrom Feb 10, 2016
Merged
wallet: Ignore MarkConflict if block hash is not known#7491laanwj merged 1 commit intobitcoin:masterfrom
laanwj merged 1 commit intobitcoin:masterfrom
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.
Member
|
utACK |
Contributor
|
utACK |
Contributor
|
@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. |
Member
Author
Yes (the other callsite should never hit this, as it is called with a block that has just become the new tip). |
Contributor
|
utACK |
Contributor
|
ACK laanwj@40e7b61 |
laanwj
added a commit
that referenced
this pull request
Feb 10, 2016
40e7b61 wallet: Ignore MarkConflict if block hash is not known (Wladimir J. van der Laan)
Member
Author
|
Cherry-picked to 0.12 as 00ec73e |
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Jul 29, 2020
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.