make sure blocks aren't skewed to future

This commit is contained in:
Kevin Froman 2020-11-09 00:18:18 +00:00
parent c81f017cde
commit 7c3a9fb6e9

View File

@ -33,4 +33,7 @@ function verifyTime(time){
if ((epoch - time) > maxBlockAge){ if ((epoch - time) > maxBlockAge){
throw new Error("Block is too old") throw new Error("Block is too old")
} }
if (time > (epoch + 60)){
throw new Error("Block is skewed to the future")
}
} }