diff --git a/pkg/services/rpcsrv/server.go b/pkg/services/rpcsrv/server.go index 545418234..7f6a06b3b 100644 --- a/pkg/services/rpcsrv/server.go +++ b/pkg/services/rpcsrv/server.go @@ -2657,7 +2657,7 @@ func getRelayResult(err error, hash util.Uint256) (any, *neorpc.Error) { return nil, neorpc.WrapErrorWithData(neorpc.ErrInsufficientNetworkFee, err.Error()) case errors.Is(err, core.ErrInvalidAttribute): return nil, neorpc.WrapErrorWithData(neorpc.ErrInvalidAttribute, err.Error()) - case errors.Is(err, core.ErrMemPoolConflict): + case errors.Is(err, core.ErrInsufficientFunds), errors.Is(err, core.ErrMemPoolConflict): return nil, neorpc.WrapErrorWithData(neorpc.ErrInsufficientFunds, err.Error()) case errors.Is(err, core.ErrInvalidSignature): return nil, neorpc.WrapErrorWithData(neorpc.ErrInvalidSignature, err.Error()) diff --git a/pkg/services/rpcsrv/server_test.go b/pkg/services/rpcsrv/server_test.go index 1b275d92c..1b74763ad 100644 --- a/pkg/services/rpcsrv/server_test.go +++ b/pkg/services/rpcsrv/server_test.go @@ -2659,7 +2659,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) [] t.Run("insufficient funds", func(t *testing.T) { b := testchain.NewBlock(t, chain, 1, 0, newTxWithParams(t, chain, opcode.PUSH1, 10, 899999999999, 1, false)) body := doRPCCall(fmt.Sprintf(rpc, encodeBinaryToString(t, b)), httpSrv.URL, t) - checkErrGetResult(t, body, true, neorpc.ErrVerificationFailedCode) + checkErrGetResult(t, body, true, neorpc.ErrInsufficientFundsCode) }) t.Run("positive", func(t *testing.T) { b := testchain.NewBlock(t, chain, 1, 0, newTxWithParams(t, chain, opcode.PUSH1, 10, 0, 1, false))