3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-15 11:45:49 +00:00

Delete chunk if it fails the hash validation in the constructor.

This commit is contained in:
CalDescent 2021-06-17 18:18:19 +01:00
parent f82f2bd287
commit 1e8dbfe4b7

View File

@ -37,6 +37,7 @@ public class DataFileChunk extends DataFile {
// Verify hash
if (!base58Digest.equals(this.base58Digest())) {
LOGGER.error("Digest {} does not match file digest {}", base58Digest, this.base58Digest());
this.delete();
throw new IllegalStateException("DataFileChunk digest validation failed");
}
} catch (IOException e) {