mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-28 08:37:22 +00:00
Base time on previous parent, not last block
This commit is contained in:
parent
2762ec22d0
commit
9f00aeae29
1 changed files with 2 additions and 2 deletions
|
|
@ -312,9 +312,9 @@ func (sm *StateManager) ValidateBlock(block *Block) error {
|
|||
}
|
||||
}
|
||||
|
||||
diff := block.Time - sm.bc.CurrentBlock.Time
|
||||
diff := block.Time - previousBlock.Time
|
||||
if diff < 0 {
|
||||
return ValidationError("Block timestamp less then prev block %v", diff)
|
||||
return ValidationError("Block timestamp less then prev block %v (%v - %v)", diff, block.Time, sm.bc.CurrentBlock.Time)
|
||||
}
|
||||
|
||||
/* XXX
|
||||
|
|
|
|||
Loading…
Reference in a new issue