Break out of orphan loop when stopping.

This commit is contained in:
CalDescent 2023-03-12 19:08:07 +00:00
parent bc44b998dc
commit e4f45c1a70

View File

@ -871,6 +871,9 @@ public class BlockChain {
BlockData orphanBlockData = repository.getBlockRepository().fromHeight(height);
while (height > targetHeight) {
if (Controller.isStopping()) {
return false;
}
LOGGER.info(String.format("Forcably orphaning block %d", height));
Block block = new Block(repository, orphanBlockData);