From f8c1eb157d6025c16c808fad01d5b32dccd8e2f1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 5 Feb 2015 14:42:12 -0800 Subject: [PATCH] Undone fix. Will re-enable once chain resets --- core/block_processor.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index e3f7646163..6db3c25f5a 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() {