add getaddressesbyaccount to btcctl
This commit is contained in:
parent
82552e4465
commit
ffe767c679
1 changed files with 40 additions and 33 deletions
|
@ -53,6 +53,7 @@ var commandHandlers = map[string]*handlerData{
|
||||||
"getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "<address>"},
|
"getaccount": &handlerData{1, 0, displayGeneric, nil, makeGetAccount, "<address>"},
|
||||||
"getaccountaddress": &handlerData{1, 0, displayGeneric, nil, makeGetAccountAddress, "<account>"},
|
"getaccountaddress": &handlerData{1, 0, displayGeneric, nil, makeGetAccountAddress, "<account>"},
|
||||||
"getaddednodeinfo": &handlerData{1, 1, displayJSONDump, []conversionHandler{toBool, nil}, makeGetAddedNodeInfo, "<dns> [node]"},
|
"getaddednodeinfo": &handlerData{1, 1, displayJSONDump, []conversionHandler{toBool, nil}, makeGetAddedNodeInfo, "<dns> [node]"},
|
||||||
|
"getaddressesbyaccount": &handlerData{1, 0, displayJSONDump, nil, makeGetAddressesByAccount, "[account]"},
|
||||||
"getbalance": &handlerData{0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"},
|
"getbalance": &handlerData{0, 2, displayGeneric, []conversionHandler{nil, toInt}, makeGetBalance, "[account] [minconf=1]"},
|
||||||
"getbestblockhash": &handlerData{0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
|
"getbestblockhash": &handlerData{0, 0, displayGeneric, nil, makeGetBestBlockHash, ""},
|
||||||
"getblock": &handlerData{1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, "<blockhash>"},
|
"getblock": &handlerData{1, 2, displayJSONDump, []conversionHandler{nil, toBool, toBool}, makeGetBlock, "<blockhash>"},
|
||||||
|
@ -238,6 +239,12 @@ func makeGetAddedNodeInfo(args []interface{}) (btcjson.Cmd, error) {
|
||||||
return cmd, nil
|
return cmd, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// makeGetAddressesByAccount generates the cmd structure for
|
||||||
|
// getaddressesbyaccount commands.
|
||||||
|
func makeGetAddressesByAccount(args []interface{}) (btcjson.Cmd, error) {
|
||||||
|
return btcjson.NewGetAddressesByAccountCmd("btcctl", args[0].(string))
|
||||||
|
}
|
||||||
|
|
||||||
// makeGetBalance generates the cmd structure for
|
// makeGetBalance generates the cmd structure for
|
||||||
// getbalance commands.
|
// getbalance commands.
|
||||||
func makeGetBalance(args []interface{}) (btcjson.Cmd, error) {
|
func makeGetBalance(args []interface{}) (btcjson.Cmd, error) {
|
||||||
|
|
Loading…
Reference in a new issue