forked from TrueCloudLab/neoneo-go
core: fix error propagation in contract-related interops
Obvious bug that hides failed contract deployments.
This commit is contained in:
parent
4b83e9a5cd
commit
4587121c7f
1 changed files with 2 additions and 2 deletions
|
@ -515,7 +515,7 @@ func (ic *interopContext) createContractStateFromVM(v *vm.VM) (*state.Contract,
|
|||
func (ic *interopContext) contractCreate(v *vm.VM) error {
|
||||
newcontract, err := ic.createContractStateFromVM(v)
|
||||
if err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
||||
if err != nil {
|
||||
|
@ -555,7 +555,7 @@ func (ic *interopContext) contractIsPayable(v *vm.VM) error {
|
|||
func (ic *interopContext) contractMigrate(v *vm.VM) error {
|
||||
newcontract, err := ic.createContractStateFromVM(v)
|
||||
if err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue