core, miner: removed vm errors from consensus err checking

Removed VM errors from the consensus errors. They now used for output
only.
This commit is contained in:
Jeffrey Wilcke
2015-07-06 11:54:11 +02:00
parent aa4502060b
commit e6bb9c1cad
5 changed files with 20 additions and 12 deletions

View File

@ -203,16 +203,23 @@ func (self *StateTransition) transitionState() (ret []byte, usedGas *big.Int, er
glog.V(logger.Core).Infoln("Insufficient gas for creating code. Require", dataGas, "and have", self.gas)
}
}
glog.V(logger.Core).Infoln("VM create err:", err)
} else {
// Increment the nonce for the next transaction
self.state.SetNonce(sender.Address(), sender.Nonce()+1)
ret, err = vmenv.Call(sender, self.To().Address(), self.data, self.gas, self.gasPrice, self.value)
glog.V(logger.Core).Infoln("VM call err:", err)
}
if err != nil && IsValueTransferErr(err) {
return nil, nil, InvalidTxError(err)
}
// We aren't interested in errors here. Errors returned by the VM are non-consensus errors and therefor shouldn't bubble up
if err != nil {
err = nil
}
if vm.Debug {
vm.StdErrFormat(vmenv.StructLogs())
}