From 8cec6694ae9e90f7b279fa5b5d66d5bf07fb9627 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 4 May 2020 16:53:36 +0300 Subject: [PATCH] rpc/server: fix test block encoding The end result of the previous code wasn't even a valid JSON. --- pkg/rpc/server/server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/server/server_test.go b/pkg/rpc/server/server_test.go index 56f9de38f..4edb9b6da 100644 --- a/pkg/rpc/server/server_test.go +++ b/pkg/rpc/server/server_test.go @@ -849,7 +849,7 @@ func TestRPC(t *testing.T) { rpc := `{"jsonrpc": "2.0", "id": 1, "method": "submitblock", "params": ["%s"]}` t.Run("empty", func(t *testing.T) { s := newBlock(t, chain, 1) - body := doRPCCall(fmt.Sprintf(rpc, s), httpSrv.URL, t) + body := doRPCCall(fmt.Sprintf(rpc, encodeBlock(t, s)), httpSrv.URL, t) checkErrGetResult(t, body, true) })