Add a few more commands with known types.
This commit is contained in:
parent
796df5b105
commit
a0dd367cd9
2 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue