Update the wallet best block marker when pruning #7502

pull sipa wants to merge 1 commits into bitcoin:master from sipa:betterflush changing 1 files +1 −1
  1. sipa commented at 2:48 pm on February 10, 2016: member
    When pruning, make sure that we update the wallet best block before deleting any files.
  2. laanwj added the label Wallet on Feb 10, 2016
  3. laanwj commented at 2:49 pm on February 10, 2016: member

    utACK

    Note: intended to fix #7494.

  4. Update the wallet best block marker when pruning e4eebb604e
  5. sipa force-pushed on Feb 10, 2016
  6. sipa renamed this:
    Update the wallet best block marker before pruning
    Update the wallet best block marker when pruning
    on Feb 10, 2016
  7. sipa commented at 4:13 pm on February 10, 2016: member

    Updated the logic to just always update the wallet best block when the chainstate is flushed. Both are relatively slow operations, so this shouldn’t have a strong effect on performance.

    There are further problems with the flushing logic, which will require a more invasive change, but those problems can only trigger when a crash during flushing happens.

  8. morcos commented at 4:21 pm on February 10, 2016: member
    utACK
  9. sdaftuar commented at 4:22 pm on February 10, 2016: member
    utACK. Needs backport!
  10. laanwj added the label Needs backport on Feb 10, 2016
  11. sdaftuar commented at 6:29 pm on February 10, 2016: member

    Verified that I can trigger the problem reported in #7494 by stopping bitcoind cleanly after the first blocks are pruned (restarting then fails).

    Verified further that this pull fixes the issue.

    ACK e4eebb604e19f67b0c7a483b1ded1229d75ecdd3

  12. laanwj commented at 6:39 pm on February 10, 2016: member
    @sdaftuar thanks for testing!
  13. laanwj merged this on Feb 10, 2016
  14. laanwj closed this on Feb 10, 2016

  15. laanwj referenced this in commit b93f078496 on Feb 10, 2016
  16. laanwj referenced this in commit 1329963001 on Feb 10, 2016
  17. laanwj commented at 7:35 pm on February 10, 2016: member
    Cherry-picked to 0.12 as 13299630013411b1a9c77d2332f9d2d45eacde0f
  18. laanwj removed the label Needs backport on Feb 10, 2016
  19. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 04:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me