diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 375f7061..3ebc3871 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -74,6 +74,7 @@ var commandHandlers = map[string]*handlerData{ "getrawtransaction": {1, 1, displayJSONDump, []conversionHandler{nil, toInt}, makeGetRawTransaction, " [verbose=0]"}, "getreceivedbyaccount": {1, 1, displayGeneric, []conversionHandler{nil, toInt}, makeGetReceivedByAccount, " [minconf=1]"}, "getreceivedbyaddress": {1, 1, displayGeneric, []conversionHandler{nil, toInt}, makeGetReceivedByAddress, "
[minconf=1]"}, + "gettransaction": {1, 1, displayJSONDump, nil, makeGetTransaction, "txid"}, "gettxoutsetinfo": {0, 0, displayJSONDump, nil, makeGetTxOutSetInfo, ""}, "getwork": {0, 1, displayJSONDump, nil, makeGetWork, "[jsonrequestobject]"}, "help": {0, 1, displayGeneric, nil, makeHelp, "[commandName]"}, @@ -429,6 +430,11 @@ func makeGetReceivedByAddress(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewGetReceivedByAddressCmd("btcctl", args[0].(string), opt...) } +// makeGetTransaction generates the cmd structure for gettransaction commands. +func makeGetTransaction(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewGetTransactionCmd("btcctl", args[0].(string)) +} + // makeGetTxOutSetInfo generates the cmd structure for gettxoutsetinfo commands. func makeGetTxOutSetInfo(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewGetTxOutSetInfoCmd("btcctl")