diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index b4a0677a..17d34818 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -53,6 +53,8 @@ var commandHandlers = map[string]*handlerData{ "decoderawtransaction": {1, 0, displayJSONDump, nil, makeDecodeRawTransaction, ""}, "decodescript": {1, 0, displayJSONDump, nil, makeDecodeScript, ""}, "dumpprivkey": {1, 0, displayGeneric, nil, makeDumpPrivKey, ""}, + "estimatefee": {1, 0, displayGeneric, []conversionHandler{toInt64}, makeEstimateFee, ""}, + "estimatepriority": {1, 0, displayGeneric, []conversionHandler{toInt64}, makeEstimatePriority, ""}, "getaccount": {1, 0, displayGeneric, nil, makeGetAccount, "
"}, "getaccountaddress": {1, 0, displayGeneric, nil, makeGetAccountAddress, ""}, "getaddednodeinfo": {1, 1, displayJSONDump, []conversionHandler{toBool, nil}, makeGetAddedNodeInfo, " [node]"}, @@ -267,6 +269,16 @@ func makeDumpPrivKey(args []interface{}) (btcjson.Cmd, error) { return btcjson.NewDumpPrivKeyCmd("btcctl", args[0].(string)) } +// makeEstimateFee generates the cmd structure for estimatefee commands. +func makeEstimateFee(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewEstimateFeeCmd("btcctl", args[0].(int64)) +} + +// makeEstimatePriority generates the cmd structure for estimatepriority commands. +func makeEstimatePriority(args []interface{}) (btcjson.Cmd, error) { + return btcjson.NewEstimatePriorityCmd("btcctl", args[0].(int64)) +} + // makeGetAccount generates the cmd structure for // getaccount commands. func makeGetAccount(args []interface{}) (btcjson.Cmd, error) {