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:
parent
a7cce3f894
commit
5fe8287fbb
4 changed files with 13 additions and 21 deletions
|
@ -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())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue