aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state_transition.go')
-rw-r--r--core/state_transition.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 00e383f3f..f54acd6ee 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -3,6 +3,7 @@ package core
import (
"fmt"
"math/big"
+
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
@@ -185,7 +186,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
}
}
if err = self.UseGas(big.NewInt(dgas)); err != nil {
- return
+ return nil, InvalidTxError(err)
}
//stateCopy := self.env.State().Copy()
@@ -231,10 +232,16 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) {
*/
}
- if err != nil {
- self.UseGas(self.gas)
+ if err != nil && IsValueTransferErr(err) {
+ return nil, InvalidTxError(err)
}
+ /*
+ if err != nil {
+ self.UseGas(self.gas)
+ }
+ */
+
return
}