diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-05 16:14:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-05 16:14:58 +0800 |
commit | c47866d25174bd783ee6bcd5b400d81d7bf598bb (patch) | |
tree | 01c71c40981f4f75e1721011006d2da96dfc3c2d /core/block_processor.go | |
parent | 15f491e5007d1507f20d0edce36cc9c0bd5cbd37 (diff) | |
download | go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar.gz go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar.bz2 go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar.lz go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar.xz go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.tar.zst go-tangerine-c47866d25174bd783ee6bcd5b400d81d7bf598bb.zip |
Miner fixes and updates (including miner)
Diffstat (limited to 'core/block_processor.go')
-rw-r--r-- | core/block_processor.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index c2799dc48..34c12729c 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -253,9 +253,6 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header) error { return fmt.Errorf("Difficulty check failed for block %v, %v", block.Difficulty, expd) } - //expl := CalcGasLimit(parent, block) - //if expl.Cmp(block.Header().GasLimit) != 0 { - // block.gasLimit - parent.gasLimit <= parent.gasLimit / 1024 a := new(big.Int).Sub(block.GasLimit, parent.GasLimit) b := new(big.Int).Div(parent.GasLimit, big.NewInt(1024)) @@ -263,8 +260,8 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header) error { return fmt.Errorf("GasLimit check failed for block %v (%v > %v)", block.GasLimit, a, b) } - if block.Time < parent.Time { - return ValidationError("Block timestamp not after prev block (%v - %v)", block.Time, parent.Time) + if block.Time <= parent.Time { + return ValidationError("Block timestamp not after or equal to prev block (%v - %v)", block.Time, parent.Time) } if int64(block.Time) > time.Now().Unix() { |