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

wallet: Ignore MarkConflict if block hash is not known #7491

Merged
merged 1 commit into from
Feb 10, 2016

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Feb 9, 2016

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.

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.
@sipa
Copy link
Member

sipa commented Feb 10, 2016

utACK

@btcdrak
Copy link
Contributor

btcdrak commented Feb 10, 2016

utACK

@morcos
Copy link
Contributor

morcos commented Feb 10, 2016

@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.

@laanwj
Copy link
Member Author

laanwj commented Feb 10, 2016

I assume that's the call site that causes this problem?

Yes (the other callsite should never hit this, as it is called with a block that has just become the new tip).

@morcos
Copy link
Contributor

morcos commented Feb 10, 2016

utACK

@paveljanik
Copy link
Contributor

ACK laanwj@40e7b61

@laanwj laanwj merged commit 40e7b61 into bitcoin:master Feb 10, 2016
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)
laanwj added a commit that referenced this pull request Feb 10, 2016
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 #7234.

Github-Pull: #7491
Rebased-From: 40e7b61
@laanwj
Copy link
Member Author

laanwj commented Feb 10, 2016

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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-regtest -reindex: Assertion `mapBlockIndex.count(hashBlock)' failed. Aborted (core dumped)
5 participants