Commit 07398e8
committed
init: allow shutdown during 'Activating best chain...'
Two-line patch to make it possible to shut down bitcoind cleanly during
the initial ActivateBestChain.
Fixes bitcoin#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...)1 parent 1b2460b commit 07398e8
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2877 | 2877 | | |
2878 | 2878 | | |
2879 | 2879 | | |
| 2880 | + | |
| 2881 | + | |
2880 | 2882 | | |
2881 | 2883 | | |
2882 | 2884 | | |
| |||
0 commit comments