diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-06 06:42:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-06 06:42:12 +0800 |
commit | f8c1eb157d6025c16c808fad01d5b32dccd8e2f1 (patch) | |
tree | 15355f17dbb7a13301a8bfb954e78d9d6d556446 /core | |
parent | cad53fa1919ce2fd3e9cd02ad918e5808c379f74 (diff) | |
download | dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar.gz dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar.bz2 dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar.lz dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar.xz dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.tar.zst dexon-f8c1eb157d6025c16c808fad01d5b32dccd8e2f1.zip |
Undone fix. Will re-enable once chain resets
Diffstat (limited to 'core')
-rw-r--r-- | core/block_processor.go | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index e3f764616..6db3c25f5 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -129,20 +129,14 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state cumulativeSum = new(big.Int) ) -done: - for i, tx := range txs { + for _, tx := range txs { receipt, txGas, err := self.ApplyTransaction(coinbase, state, block, tx, totalUsedGas, transientProcess) if err != nil { - return nil, nil, nil, nil, err - switch { case IsNonceErr(err): - err = nil // ignore error - continue + return nil, nil, nil, nil, err case IsGasLimitErr(err): - unhandled = txs[i:] - - break done + return nil, nil, nil, nil, err default: statelogger.Infoln(err) erroneous = append(erroneous, tx) @@ -260,9 +254,8 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) } - diff := block.Header().Time - parent.Header().Time - if diff <= 0 { - return ValidationError("Block timestamp not after prev block %v (%v - %v)", diff, block.Header().Time, sm.bc.CurrentBlock().Header().Time) + if block.Time() < parent.Time() { + return ValidationError("Block timestamp not after prev block (%v - %v)", block.Header().Time, parent.Header().Time) } if block.Time() > time.Now().Unix() { |