neotest: return failed tx hash

It still may be useful for debugging and tests.
This commit is contained in:
Anna Shaleva 2022-05-19 13:55:32 +03:00
parent deb1f6d3d8
commit b840674433

View file

@ -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()
}