From b840674433dabf232850cb72055451983d1ef304 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Thu, 19 May 2022 13:55:32 +0300 Subject: [PATCH] neotest: return failed tx hash It still may be useful for debugging and tests. --- pkg/neotest/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/neotest/client.go b/pkg/neotest/client.go index e35314655..513780d7f 100644 --- a/pkg/neotest/client.go +++ b/pkg/neotest/client.go @@ -109,8 +109,9 @@ func (c *ContractInvoker) InvokeWithFeeFail(t testing.TB, message string, sysFee // InvokeFail invokes the method with the args, persists the transaction and checks the error message. // It returns the transaction hash. -func (c *ContractInvoker) InvokeFail(t testing.TB, message string, method string, args ...interface{}) { +func (c *ContractInvoker) InvokeFail(t testing.TB, message string, method string, args ...interface{}) util.Uint256 { tx := c.PrepareInvoke(t, method, args...) c.AddNewBlock(t, tx) c.CheckFault(t, tx.Hash(), message) + return tx.Hash() }