Update StateTests and nil create return on failed code deposit

This commit is contained in:
Gustav Simonsson
2015-05-15 18:49:31 +02:00
parent 830bdb1cfd
commit 32276e8b01
2 changed files with 13 additions and 2 deletions

View File

@ -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)
}
}