Make RewindBlockIndex interruptible

This commit is contained in:
Pieter Wuille committed 2019-02-24 18:55:21 -08:00
1 parent 880ce7d46b
commit 241b2c74ac
1 file changed
+1 -1
+1 -1
View File
@@ -4243,7 +4243,7 @@ bool CChainState::RewindBlockIndex(const CChainParams& params)
CValidationState state; CValidationState state;
// Loop until the tip is below nHeight, or we reach a pruned block. // Loop until the tip is below nHeight, or we reach a pruned block.
while (true) { while (!ShutdownRequested()) {
{ {
LOCK(cs_main); LOCK(cs_main);
// Make sure nothing changed from under us (this won't happen because RewindBlockIndex runs before importing/network are active) // Make sure nothing changed from under us (this won't happen because RewindBlockIndex runs before importing/network are active)