mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 13:56:35 +00:00
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 {
|
func (ic *interopContext) contractCreate(v *vm.VM) error {
|
||||||
newcontract, err := ic.createContractStateFromVM(v)
|
newcontract, err := ic.createContractStateFromVM(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -555,7 +555,7 @@ func (ic *interopContext) contractIsPayable(v *vm.VM) error {
|
||||||
func (ic *interopContext) contractMigrate(v *vm.VM) error {
|
func (ic *interopContext) contractMigrate(v *vm.VM) error {
|
||||||
newcontract, err := ic.createContractStateFromVM(v)
|
newcontract, err := ic.createContractStateFromVM(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
contract, err := ic.dao.GetContractState(newcontract.ScriptHash())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue