aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/state_transition.go1
-rw-r--r--tests/vm/gh_test.go14
2 files changed, 13 insertions, 2 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index d95cbd35a..3d11a0464 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -205,6 +205,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
if err := self.UseGas(dataGas); err == nil {
ref.SetCode(ret)
} else {
+ ret = nil // does not affect consensus but useful for StateTests validations
glog.V(logger.Core).Infoln("Insufficient gas for creating code. Require", dataGas, "and have", self.gas)
}
}
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 612537ddf..2f0d058e3 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -269,8 +269,13 @@ func TestVmLog(t *testing.T) {
RunVmTest(fn, t)
}
-func TestInputLimits1(t *testing.T) {
- const fn = "../files/VMTests/vmInputLimits1.json"
+func TestInputLimits(t *testing.T) {
+ const fn = "../files/VMTests/vmInputLimits.json"
+ RunVmTest(fn, t)
+}
+
+func TestInputLimitsLight(t *testing.T) {
+ const fn = "../files/VMTests/vmInputLimitsLight.json"
RunVmTest(fn, t)
}
@@ -350,3 +355,8 @@ func TestSolidity(t *testing.T) {
const fn = "../files/StateTests/stSolidityTest.json"
RunVmTest(fn, t)
}
+
+func TestWallet(t *testing.T) {
+ const fn = "../files/StateTests/stWalletTest.json"
+ RunVmTest(fn, t)
+}