HomePhabricator

init: allow shutdown during 'Activating best chain...'
07398e8e9d2eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Apr 6 2016, 08:27
deadalnixPushed on May 14 2017, 22:04
Parents
rABC1b2460bd5824: Merge #7793: [doxygen] Fix member comments
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABC07398e8e9d2e: init: allow shutdown during 'Activating best chain...' (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Apr 6 2016, 08:33