From 9f00aeae29d53fec358fcecdc9bcc162b8e3984c Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 18 Jul 2014 16:13:21 +0200 Subject: Base time on previous parent, not last block --- ethchain/state_manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethchain') diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index a12ce53e5..f28f45eab 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -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 -- cgit v1.2.3