diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 5ad153c4..fdd3b5f8 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -94,6 +94,7 @@ var commandHandlers = map[string]*handlerData{ "settxfee": &handlerData{1, 0, displayGeneric, []conversionHandler{toSatoshi}, makeSetTxFee, ""}, "stop": &handlerData{0, 0, displayGeneric, nil, makeStop, ""}, "submitblock": &handlerData{1, 1, displayGeneric, nil, makeSubmitBlock, " [jsonparametersobject]"}, + "validateaddress": &handlerData{1, 0, displayJSONDump, nil, makeValidateAddress, "
"}, "verifychain": &handlerData{0, 2, displayJSONDump, []conversionHandler{toInt, toInt}, makeVerifyChain, "[level] [numblocks]"}, "walletlock": &handlerData{0, 0, displayGeneric, nil, makeWalletLock, ""}, "walletpassphrase": &handlerData{1, 1, displayGeneric, []conversionHandler{nil, toInt64}, makeWalletPassphrase, " [timeout]"}, @@ -645,6 +646,11 @@ func makeSubmitBlock(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewSubmitBlockCmd("btcctl", args[0].(string), opts) } +// makeValidateAddress generates the cmd structure for validateaddress commands. +func makeValidateAddress(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewValidateAddressCmd("btcctl", args[0].(string)) +} + // makeVerifyChain generates the cmd structure for verifychain commands. func makeVerifyChain(args []interface{}) (btcjson.Cmd, error) { iargs := make([]int32, 0, 2)