From 5fcdfb040adbd0f0e6b8066544cbb360abf24706 Mon Sep 17 00:00:00 2001 From: David Hill Date: Mon, 24 Mar 2014 15:52:40 -0400 Subject: [PATCH] add importwallet 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 6ccc5785..5a7dba84 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -82,6 +82,7 @@ var commandHandlers = map[string]*handlerData{ "getwork": {0, 1, displayJSONDump, nil, makeGetWork, "[data]"}, "help": {0, 1, displayGeneric, nil, makeHelp, "[commandName]"}, "importprivkey": {1, 2, displayGeneric, []conversionHandler{nil, nil, toBool}, makeImportPrivKey, " [label] [rescan=true]"}, + "importwallet": {1, 0, displayGeneric, nil, makeImportWallet, ""}, "keypoolrefill": {0, 1, displayGeneric, []conversionHandler{toInt}, makeKeyPoolRefill, "[newsize]"}, "listaccounts": {0, 1, displayJSONDump, []conversionHandler{toInt}, makeListAccounts, "[minconf=1]"}, "listaddressgroupings": {0, 0, displayJSONDump, nil, makeListAddressGroupings, ""}, @@ -517,6 +518,12 @@ func makeImportPrivKey(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewImportPrivKeyCmd("btcctl", args[0].(string), optargs...) } +// makeImportWallet generates the cmd structure for +// importwallet commands. +func makeImportWallet(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewImportWalletCmd("btcctl", args[0].(string)) +} + // makeKeyPoolRefill generates the cmd structure for keypoolrefill commands. func makeKeyPoolRefill(args []interface{}) (btcjson.Cmd, error) { var optargs = make([]uint, 0, 1)