diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-18 22:13:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-18 22:13:21 +0800 |
commit | 9f00aeae29d53fec358fcecdc9bcc162b8e3984c (patch) | |
tree | 598021efc9311c3cb889539131022d2ad9cd6af4 | |
parent | 2762ec22d0693b406ead2f0c07b62e9b66d395e4 (diff) | |
download | go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar.gz go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar.bz2 go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar.lz go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar.xz go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.tar.zst go-tangerine-9f00aeae29d53fec358fcecdc9bcc162b8e3984c.zip |
Base time on previous parent, not last block
-rw-r--r-- | ethchain/state_manager.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |