diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index aaad86e1..fb88704e 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -61,6 +61,7 @@ var commandHandlers = map[string]*handlerData{ "getbalance": {0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"}, "getbestblockhash": {0, 0, displayGeneric, nil, makeGetBestBlockHash, ""}, "getblock": {1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, ""}, + "getblockchaininfo": {0, 0, displayJSONDump, nil, makeGetBlockChainInfo, ""}, "getblockcount": {0, 0, displayGeneric, nil, makeGetBlockCount, ""}, "getblockhash": {1, 0, displayGeneric, []conversionHandler{toInt64}, makeGetBlockHash, ""}, "getblocktemplate": {0, 1, displayJSONDump, nil, makeGetBlockTemplate, "[jsonrequestobject]"}, @@ -342,6 +343,11 @@ func makeGetBlock(args []interface{}) (btcjson.Cmd, error) { return getBlockCmd, nil } +// makeGetBlockChainInfo generates the cmd structure for getblockchaininfo commands. +func makeGetBlockChainInfo(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewGetBlockChainInfoCmd("btcctl") +} + // makeGetBlockCount generates the cmd structure for getblockcount commands. func makeGetBlockCount(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewGetBlockCountCmd("btcctl")