forked from TrueCloudLab/frostfs-node
[#474] morph/client: Add FaultException to error msg
If non-"HALT" `State` occurs after calling `InvokeFunction` NeoGo client method, add `FaultException` information to returning error. Add returning state check to `NotaryInvoke` method of the morph/client. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
f6f2e4d10f
commit
4a4aee82e0
2 changed files with 19 additions and 1 deletions
|
@ -222,6 +222,11 @@ func (c *Client) notaryInvoke(committee bool, contract util.Uint160, method stri
|
|||
return err
|
||||
}
|
||||
|
||||
// check invocation state
|
||||
if test.State != HaltState {
|
||||
return &NotHaltStateError{state: test.State, exception: test.FaultException}
|
||||
}
|
||||
|
||||
// if test invocation failed, then return error
|
||||
if len(test.Script) == 0 {
|
||||
return errEmptyInvocationScript
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue