forked from TrueCloudLab/neoneo-go
Merge pull request #1448 from nspcc-dev/rpc/create_tx_from_script_fix
rpc: check VM state in (*Client).CreateTXFromScript
This commit is contained in:
commit
5b6db7e93b
1 changed files with 3 additions and 0 deletions
|
@ -155,6 +155,9 @@ func (c *Client) CreateTxFromScript(script []byte, acc *wallet.Account, sysFee,
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("can't add system fee to transaction: %w", err)
|
||||
}
|
||||
if result.State != "HALT" {
|
||||
return nil, fmt.Errorf("can't add system fee to transaction: bad vm state: %s", result.State)
|
||||
}
|
||||
sysFee = result.GasConsumed
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue