diff --git a/rpcwebsocket.go b/rpcwebsocket.go index 7e147f510..623e4a38e 100644 --- a/rpcwebsocket.go +++ b/rpcwebsocket.go @@ -1389,10 +1389,9 @@ func handleGetBestBlock(wsc *wsClient, icmd btcjson.Cmd) (interface{}, *btcjson. return nil, &btcjson.ErrBestBlockHash } - // TODO(jrick): need a btcws type for the result. - result := map[string]interface{}{ - "hash": sha.String(), - "height": height, + result := &btcws.GetBestBlockResult{ + Hash: sha.String(), + Height: int32(height), } return result, nil }