From 75b59ef6e41cfd4321a6cd61060897b7f044e908 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Tue, 4 Feb 2014 00:42:44 +0000 Subject: [PATCH] Add gettransaction to btcctl. --- util/btcctl/btcctl.go | 6 ++++++ 1 file changed, 6 insertions(+) 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")