diff --git a/jsonapi.go b/jsonapi.go index e07d5aa0..aef9321f 100644 --- a/jsonapi.go +++ b/jsonapi.go @@ -676,7 +676,8 @@ func readResultCmd(cmd string, message []byte) (Reply, error) { // For commands that return a single item, we get it with the // correct concrete type for free (but treat them separately // for clarity). - case "getblockcount": + case "getblockcount", "getbalance", "getblocknumber", "getgenerate", + "getconnetioncount", "getdifficulty", "gethashespersec": err = json.Unmarshal(message, &result) if err != nil { err = fmt.Errorf("Error unmarshalling json reply: %v", err) diff --git a/test_coverage.txt b/test_coverage.txt index 4c58d3ec..642e5261 100644 --- a/test_coverage.txt +++ b/test_coverage.txt @@ -6,7 +6,7 @@ github.com/conformal/btcjson/jsonfxns.go MarshallAndSend 100.00% (7/7) github.com/conformal/btcjson/jsonfxns.go GetRaw 100.00% (6/6) github.com/conformal/btcjson/jsonapi.go jsonWithArgs 100.00% (5/5) github.com/conformal/btcjson/jsonapi.go IsValidIdType 100.00% (3/3) -github.com/conformal/btcjson/jsonapi.go readResultCmd 90.16% (55/61) +github.com/conformal/btcjson/jsonapi.go readResultCmd 90.00% (54/60) github.com/conformal/btcjson/jsonapi.go RpcCommand 66.67% (18/27) -github.com/conformal/btcjson --------------- 96.60% (426/441) +github.com/conformal/btcjson --------------- 96.59% (425/440)