From 426db5ae216f3e99cc82ffc55bfe0a2589780eda Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 31 Dec 2013 13:11:01 -0500 Subject: [PATCH] Add getaccountaddress support to btcctl. --- util/btcctl/btcctl.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 71e143c4f..b34940bd0 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -49,6 +49,7 @@ var commandHandlers = map[string]*handlerData{ "decoderawtransaction": &handlerData{1, 0, displayJSONDump, nil, makeDecodeRawTransaction, ""}, "dumpprivkey": &handlerData{1, 0, displayGeneric, nil, makeDumpPrivKey, ""}, "getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "
"}, + "getaccountaddress": &handlerData{1, 0, displayGeneric, nil, makeGetAccountAddress, ""}, "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, ""}, @@ -173,6 +174,12 @@ func makeGetAccount(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewGetAccountCmd("btcctl", args[0].(string)) } +// makeGetAccountAddress generates the cmd structure for +// getaccountaddress commands. +func makeGetAccountAddress(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewGetAccountAddressCmd("btcctl", args[0].(string)) +} + // makeGetBalance generates the cmd structure for // getbalance commands. func makeGetBalance(args []interface{}) (btcjson.Cmd, error) {