[#496] morph/client: fallback to simple invoke in NotaryInvoke

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-21 10:39:21 +03:00 committed by Alex Vanin
parent 2e31cd34e6
commit b5cda8cd41
7 changed files with 23 additions and 104 deletions

View file

@ -63,10 +63,14 @@ func (s StaticClient) TestInvoke(method string, args ...interface{}) ([]stackite
}
// NotaryInvoke calls NotaryInvoke method of Client with static internal
// script hash. Returns error if notary support was not enabled in underlying
// script hash. Panics if notary support was not enabled in underlying
// moprh client.
func (s StaticClient) NotaryInvoke(method string, args ...interface{}) error {
return s.client.NotaryInvoke(
if s.client.notary == nil {
panic(notaryNotEnabledPanicMsg)
}
return s.client.notaryInvoke(
false,
s.scScriptHash,
method,
args...,