rpc: use non-pointer Block and Transaction in results

Pointers can be nil and in some cases it's important to always have access to
Block or Transaction fields.
This commit is contained in:
Roman Khimov 2020-06-18 11:47:54 +03:00
parent a7cce3f894
commit 5fe8287fbb
4 changed files with 13 additions and 21 deletions

View file

@ -890,7 +890,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
err := json.Unmarshal(txOut, &actual)
require.NoErrorf(t, err, "could not parse response: %s", txOut)
assert.Equal(t, block.Transactions[0], actual.Transaction)
assert.Equal(t, *block.Transactions[0], actual.Transaction)
assert.Equal(t, 8, actual.Confirmations)
assert.Equal(t, TXHash, actual.Transaction.Hash())
})