rpc/server: fix test block encoding
The end result of the previous code wasn't even a valid JSON.
This commit is contained in:
parent
d275652b37
commit
8cec6694ae
1 changed files with 1 additions and 1 deletions
|
@ -849,7 +849,7 @@ func TestRPC(t *testing.T) {
|
||||||
rpc := `{"jsonrpc": "2.0", "id": 1, "method": "submitblock", "params": ["%s"]}`
|
rpc := `{"jsonrpc": "2.0", "id": 1, "method": "submitblock", "params": ["%s"]}`
|
||||||
t.Run("empty", func(t *testing.T) {
|
t.Run("empty", func(t *testing.T) {
|
||||||
s := newBlock(t, chain, 1)
|
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)
|
checkErrGetResult(t, body, true)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue