From 1fd5cd274227cbed58fc4d353ae7aa38f31b9103 Mon Sep 17 00:00:00 2001 From: Josh Rickmar <jrick@conformal.com> Date: Thu, 10 Apr 2014 20:03:54 -0500 Subject: [PATCH] Use btcws.GetBestBlockResult. --- rpcwebsocket.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rpcwebsocket.go b/rpcwebsocket.go index 7e147f51..623e4a38 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 }