aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-07-04 01:54:14 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-07-04 15:27:42 +0800
commit0f04af5916cba5234118a442b6100c8122389abf (patch)
tree5941123c1c1ad743d2e4e231481fdb93d005224c /core/block_processor.go
parent9c3db1be1dd24c366a58a7ced22adfa0b0839efe (diff)
downloadgo-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar.gz
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar.bz2
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar.lz
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar.xz
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.tar.zst
go-tangerine-0f04af5916cba5234118a442b6100c8122389abf.zip
Fix core error forwarding, unify OOG VM err
Diffstat (limited to 'core/block_processor.go')
-rw-r--r--core/block_processor.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index e7ad059c3..660c917e4 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -9,6 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
+ "github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
@@ -72,7 +73,7 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
cb := statedb.GetStateObject(coinbase.Address())
_, gas, err := ApplyMessage(NewEnv(statedb, self.bc, tx, header), tx, cb)
- if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) {
+ if err != nil && err != vm.OutOfGasError {
return nil, nil, err
}
@@ -118,7 +119,7 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state
statedb.StartRecord(tx.Hash(), block.Hash(), i)
receipt, txGas, err := self.ApplyTransaction(coinbase, statedb, header, tx, totalUsedGas, transientProcess)
- if err != nil && (IsNonceErr(err) || state.IsGasLimitErr(err) || IsInvalidTxErr(err)) {
+ if err != nil && err != vm.OutOfGasError {
return nil, err
}