Commit 32276e8b authored by Gustav Simonsson's avatar Gustav Simonsson

Update StateTests and nil create return on failed code deposit

parent 830bdb1c
...@@ -205,6 +205,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er ...@@ -205,6 +205,7 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
if err := self.UseGas(dataGas); err == nil { if err := self.UseGas(dataGas); err == nil {
ref.SetCode(ret) ref.SetCode(ret)
} else { } 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) glog.V(logger.Core).Infoln("Insufficient gas for creating code. Require", dataGas, "and have", self.gas)
} }
} }
......
...@@ -269,8 +269,13 @@ func TestVmLog(t *testing.T) { ...@@ -269,8 +269,13 @@ func TestVmLog(t *testing.T) {
RunVmTest(fn, t) RunVmTest(fn, t)
} }
func TestInputLimits1(t *testing.T) { func TestInputLimits(t *testing.T) {
const fn = "../files/VMTests/vmInputLimits1.json" const fn = "../files/VMTests/vmInputLimits.json"
RunVmTest(fn, t)
}
func TestInputLimitsLight(t *testing.T) {
const fn = "../files/VMTests/vmInputLimitsLight.json"
RunVmTest(fn, t) RunVmTest(fn, t)
} }
...@@ -350,3 +355,8 @@ func TestSolidity(t *testing.T) { ...@@ -350,3 +355,8 @@ func TestSolidity(t *testing.T) {
const fn = "../files/StateTests/stSolidityTest.json" const fn = "../files/StateTests/stSolidityTest.json"
RunVmTest(fn, t) RunVmTest(fn, t)
} }
func TestWallet(t *testing.T) {
const fn = "../files/StateTests/stWalletTest.json"
RunVmTest(fn, t)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment