Skip to content

Commit

Permalink
Re #856: using out of space code on exit from TaskImportBlocks.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraRoatis committed Jul 26, 2019
1 parent cc696b6 commit c7c3765
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modAionImpl/src/org/aion/zero/impl/sync/TaskImportBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.aion.p2p.P2pConstant;
import org.aion.util.types.ByteArrayWrapper;
import org.aion.zero.impl.AionBlockchainImpl;
import org.aion.zero.impl.SystemExitCodes;
import org.aion.zero.impl.db.AionBlockStore;
import org.aion.zero.impl.sync.PeerState.Mode;
import org.aion.zero.impl.sync.statistics.BlockType;
Expand Down Expand Up @@ -269,8 +270,8 @@ private PeerState processBatch(PeerState givenState, List<Block> batch, String d
log.error("<import-block throw> ", e);

if (e.getMessage() != null && e.getMessage().contains("No space left on device")) {
log.error("Shutdown due to lack of disk space.");
System.exit(0);
log.error("Shutdown due to lack of disk space.", e);
System.exit(SystemExitCodes.OUT_OF_DISK_SPACE);
}
break;
}
Expand Down Expand Up @@ -698,8 +699,8 @@ private int importFromStorage(PeerState state, long first, long last) {
log.error("<import-block throw> ", e);
if (e.getMessage() != null
&& e.getMessage().contains("No space left on device")) {
log.error("Shutdown due to lack of disk space.");
System.exit(0);
log.error("Shutdown due to lack of disk space.", e);
System.exit(SystemExitCodes.OUT_OF_DISK_SPACE);
}
}
}
Expand Down

0 comments on commit c7c3765

Please sign in to comment.