Add getnettotals to btcctl.

This commit is contained in:
Dave Collins 2014-02-04 01:26:21 -06:00
parent ba5e457c38
commit aab3a6643c

View file

@ -66,6 +66,7 @@ var commandHandlers = map[string]*handlerData{
"getgenerate": &handlerData{0, 0, displayGeneric, nil, makeGetGenerate, ""},
"gethashespersec": &handlerData{0, 0, displayGeneric, nil, makeGetHashesPerSec, ""},
"getinfo": &handlerData{0, 0, displayJSONDump, nil, makeGetInfo, ""},
"getnettotals": &handlerData{0, 0, displayGeneric, nil, makeGetNetTotals, ""},
"getnewaddress": &handlerData{0, 1, displayGeneric, nil, makeGetNewAddress, "[account]"},
"getpeerinfo": &handlerData{0, 0, displayJSONDump, nil, makeGetPeerInfo, ""},
"getrawchangeaddress": &handlerData{0, 0, displayGeneric, nil, makeGetRawChangeAddress, ""},
@ -372,6 +373,11 @@ func makeGetInfo(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewGetInfoCmd("btcctl")
}
// makeGetNetTotals generates the cmd structure for getnettotals commands.
func makeGetNetTotals(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewGetNetTotalsCmd("btcctl")
}
// makeGetNewAddress generates the cmd structure for getnewaddress commands.
func makeGetNewAddress(args []interface{}) (btcjson.Cmd, error) {
var account string