forked from Qortal/qortal
Break out of orphan loop when stopping.
This commit is contained in:
parent
bc44b998dc
commit
e4f45c1a70
@ -871,6 +871,9 @@ public class BlockChain {
|
|||||||
BlockData orphanBlockData = repository.getBlockRepository().fromHeight(height);
|
BlockData orphanBlockData = repository.getBlockRepository().fromHeight(height);
|
||||||
|
|
||||||
while (height > targetHeight) {
|
while (height > targetHeight) {
|
||||||
|
if (Controller.isStopping()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
LOGGER.info(String.format("Forcably orphaning block %d", height));
|
LOGGER.info(String.format("Forcably orphaning block %d", height));
|
||||||
|
|
||||||
Block block = new Block(repository, orphanBlockData);
|
Block block = new Block(repository, orphanBlockData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user