aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorferhat elmas <elmas.ferhat@gmail.com>2018-02-15 04:02:51 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-15 04:02:51 +0800
commitdc7ca52b3b7c84e8371ea0c1acde327149df6c50 (patch)
tree4fdb175d6f2cfcfa18ef4426f0047cb5b09a0364 /core
parentff225db813b6d56ecd35db301bc582ca04e42b27 (diff)
downloadgo-tangerine-dc7ca52b3b7c84e8371ea0c1acde327149df6c50.tar.gz
go-tangerine-dc7ca52b3b7c84e8371ea0c1acde327149df6c50.tar.zst
go-tangerine-dc7ca52b3b7c84e8371ea0c1acde327149df6c50.zip
core: handle ignored error (#16065)
- according to implementation of `IntrinsicGas` we can continue execution since problem will be detected later. However, early return is future-proof for changes.
Diffstat (limited to 'core')
-rw-r--r--core/state_transition.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 390473fff..b19bc12e4 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -215,6 +215,9 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo
// Pay intrinsic gas
gas, err := IntrinsicGas(st.data, contractCreation, homestead)
+ if err != nil {
+ return nil, 0, false, err
+ }
if err = st.useGas(gas); err != nil {
return nil, 0, false, err
}