Commit 9f00aeae authored by obscuren's avatar obscuren

Base time on previous parent, not last block

parent 2762ec22
...@@ -312,9 +312,9 @@ func (sm *StateManager) ValidateBlock(block *Block) error { ...@@ -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 { 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 /* XXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment