init: allow shutdown during ‘Activating best chain…’ #7821

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2016_04_shutdown_during_activate_best_chain changing 1 files +2 −0
  1. laanwj commented at 8:34 am on April 6, 2016: member

    Two-line patch to make it possible to shut down bitcoind cleanly during the initial ActivateBestChain.

    Fixes #6459 (among other complaints).

    To reproduce:

    • shutdown bitcoind
    • copy chainstate
    • start bitcoind
    • let the chain sync a bit
    • shutdown bitcoind
    • copy back old chainstate
    • start bitcoind
    • bitcoind will catch up with all blocks during Init(), this can take a long time

    (the boost::this_thread::interruption_point / ShutdownRequested() dance is ugly, this should be refactored all over bitcoind at some point when moving from boost::threads to c++11 threads, but it works…)

  2. init: allow shutdown during 'Activating best chain...'
    Two-line patch to make it possible to shut down bitcoind cleanly during
    the initial ActivateBestChain.
    
    Fixes #6459 (among other complaints).
    
    To reproduce:
    
    - shutdown bitcoind
    - copy chainstate
    - start bitcoind
    - let the chain sync a bit
    - shutdown bitcoind
    - copy back old chainstate
    - start bitcoind
    - bitcoind will catch up with all blocks during Init()
    
    (the `boost::this_thread::interruption_point` / `ShutdownRequested()`
    dance is ugly, this should be refactored all over bitcoind at some point
    when moving from boost::threads to c++11 threads, but it works...)
    07398e8e9d
  3. laanwj added the label Validation on Apr 6, 2016
  4. laanwj added the label Needs backport on Apr 6, 2016
  5. jonasschnelli commented at 9:01 am on April 6, 2016: contributor
    utACK 07398e8e9d2ef807e63abd0978a6e98549bdf271
  6. dcousens commented at 3:14 am on April 7, 2016: contributor
    concept ACK, utACK 07398e8
  7. sipa commented at 10:44 am on April 7, 2016: member
    utACK 07398e8
  8. laanwj merged this on Apr 7, 2016
  9. laanwj closed this on Apr 7, 2016

  10. laanwj referenced this in commit bbaf5976af on Apr 7, 2016
  11. laanwj removed the label Needs backport on Apr 7, 2016
  12. laanwj referenced this in commit 4226aacdba on Apr 7, 2016
  13. zander referenced this in commit 245c48330f on Apr 22, 2016
  14. thokon00 referenced this in commit 9b7c5d5653 on Jun 28, 2016
  15. 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-09-29 10:12 UTC

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