1
0
mirror of https://github.com/Qortal/qortal.git synced 2025-08-14 14:41:38 +00:00

Merge pull request from lgedgar/log-invalid-timestamps

Add debug logging when invalid timestamp is encountered
This commit is contained in:
AlphaX-Projects
2024-02-14 15:41:09 +01:00
committed by GitHub

@@ -1061,8 +1061,10 @@ public class Block {
return ValidationResult.MINTER_NOT_ACCEPTED;
long expectedTimestamp = calcTimestamp(parentBlockData, this.blockData.getMinterPublicKey(), minterLevel);
if (this.blockData.getTimestamp() != expectedTimestamp)
return ValidationResult.TIMESTAMP_INCORRECT;
if (this.blockData.getTimestamp() != expectedTimestamp) {
LOGGER.debug(String.format("timestamp mismatch! block had %s but we expected %s", this.blockData.getTimestamp(), expectedTimestamp));
return ValidationResult.TIMESTAMP_INCORRECT;
}
return ValidationResult.OK;
}