Clarify comment and add command to concrete type list.
This commit is contained in:
parent
a0dd367cd9
commit
7a1a05d695
1 changed files with 4 additions and 3 deletions
|
@ -673,11 +673,12 @@ func readResultCmd(cmd string, message []byte) (Reply, error) {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
result.Result = res
|
result.Result = res
|
||||||
// For commands that return a single item, we get it with the
|
// For commands that return a single item (or no items), we get it with
|
||||||
// correct concrete type for free (but treat them separately
|
// the correct concrete type for free (but treat them separately
|
||||||
// for clarity).
|
// for clarity).
|
||||||
case "getblockcount", "getbalance", "getblocknumber", "getgenerate",
|
case "getblockcount", "getbalance", "getblocknumber", "getgenerate",
|
||||||
"getconnetioncount", "getdifficulty", "gethashespersec":
|
"getconnetioncount", "getdifficulty", "gethashespersec",
|
||||||
|
"setgenerate":
|
||||||
err = json.Unmarshal(message, &result)
|
err = json.Unmarshal(message, &result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("Error unmarshalling json reply: %v", err)
|
err = fmt.Errorf("Error unmarshalling json reply: %v", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue