add getblockchaininfo to btcctl
This commit is contained in:
parent
5b376b3b5e
commit
ce142e8ca2
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,7 @@ var commandHandlers = map[string]*handlerData{
|
||||||
"getbalance": {0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"},
|
"getbalance": {0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"},
|
||||||
"getbestblockhash": {0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
|
"getbestblockhash": {0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
|
||||||
"getblock": {1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, "<blockhash>"},
|
"getblock": {1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, "<blockhash>"},
|
||||||
|
"getblockchaininfo": {0, 0, displayJSONDump, nil, makeGetBlockChainInfo, ""},
|
||||||
"getblockcount": {0, 0, displayGeneric, nil, makeGetBlockCount, ""},
|
"getblockcount": {0, 0, displayGeneric, nil, makeGetBlockCount, ""},
|
||||||
"getblockhash": {1, 0, displayGeneric, []conversionHandler{toInt64}, makeGetBlockHash, "<blocknumber>"},
|
"getblockhash": {1, 0, displayGeneric, []conversionHandler{toInt64}, makeGetBlockHash, "<blocknumber>"},
|
||||||
"getblocktemplate": {0, 1, displayJSONDump, nil, makeGetBlockTemplate, "[jsonrequestobject]"},
|
"getblocktemplate": {0, 1, displayJSONDump, nil, makeGetBlockTemplate, "[jsonrequestobject]"},
|
||||||
|
@ -342,6 +343,11 @@ func makeGetBlock(args []interface{}) (btcjson.Cmd, error) {
|
||||||
return getBlockCmd, nil
|
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.
|
// makeGetBlockCount generates the cmd structure for getblockcount commands.
|
||||||
func makeGetBlockCount(args []interface{}) (btcjson.Cmd, error) {
|
func makeGetBlockCount(args []interface{}) (btcjson.Cmd, error) {
|
||||||
return btcjson.NewGetBlockCountCmd("btcctl")
|
return btcjson.NewGetBlockCountCmd("btcctl")
|
||||||
|
|
Loading…
Reference in a new issue