mirror of
https://github.com/Qortal/qortal.git
synced 2025-04-19 01:25:54 +00:00
added logging, so we can better understand the exception thrown
This commit is contained in:
parent
4188f18a9a
commit
934c23402a
@ -439,7 +439,15 @@ public class ArbitraryDataReader {
|
||||
// Ensure the complete hash matches the joined chunks
|
||||
if (!Arrays.equals(arbitraryDataFile.digest(), transactionData.getData())) {
|
||||
// Delete the invalid file
|
||||
arbitraryDataFile.delete();
|
||||
LOGGER.info("Deleting invalid file: path = " + arbitraryDataFile.getFilePath());
|
||||
|
||||
if( arbitraryDataFile.delete() ) {
|
||||
LOGGER.info("Deleted invalid file successfully: path = " + arbitraryDataFile.getFilePath());
|
||||
}
|
||||
else {
|
||||
LOGGER.warn("Could not delete invalid file: path = " + arbitraryDataFile.getFilePath());
|
||||
}
|
||||
|
||||
throw new DataException("Unable to validate complete file hash");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user