diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 250d8700..4331af3b 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -48,6 +48,7 @@ var commandHandlers = map[string]*handlerData{ "debuglevel": &handlerData{1, 0, displayGeneric, nil, makeDebugLevel, ""}, "decoderawtransaction": &handlerData{1, 0, displayJSONDump, nil, makeDecodeRawTransaction, ""}, "dumpprivkey": &handlerData{1, 0, displayGeneric, nil, makeDumpPrivKey, ""}, + "getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "
"}, "getbalance": &handlerData{0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"}, "getbestblockhash": &handlerData{0, 0, displayGeneric, nil, makeGetBestBlockHash, ""}, "getblock": &handlerData{1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, ""}, @@ -166,6 +167,12 @@ func makeDumpPrivKey(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewDumpPrivKeyCmd("btcctl", args[0].(string)) } +// makeGetAccount generates the cmd structure for +// getaddress commands. +func makeGetAccount(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewGetAccountCmd("btcctl", args[0].(string)) +} + // makeGetBalance generates the cmd structure for // getbalance commands. func makeGetBalance(args []interface{}) (btcjson.Cmd, error) {