add settxfee to btcctl

This commit is contained in:
David Hill 2014-01-27 16:31:48 -05:00
parent c0d6180685
commit 2697a0a9ea

View file

@ -78,6 +78,7 @@ var commandHandlers = map[string]*handlerData{
makeSendFrom, "<account> <address> <amount> [minconf=1] [comment] [comment-to]"}, makeSendFrom, "<account> <address> <amount> [minconf=1] [comment] [comment-to]"},
"sendmany": &handlerData{2, 2, displayGeneric, []conversionHandler{nil, nil, toInt, nil}, makeSendMany, "<account> <{\"address\":amount,...}> [minconf=1] [comment]"}, "sendmany": &handlerData{2, 2, displayGeneric, []conversionHandler{nil, nil, toInt, nil}, makeSendMany, "<account> <{\"address\":amount,...}> [minconf=1] [comment]"},
"sendrawtransaction": &handlerData{1, 0, displayGeneric, nil, makeSendRawTransaction, "<hextx>"}, "sendrawtransaction": &handlerData{1, 0, displayGeneric, nil, makeSendRawTransaction, "<hextx>"},
"settxfee": &handlerData{1, 0, displayGeneric, []conversionHandler{toSatoshi}, makeSetTxFee, "<amount>"},
"stop": &handlerData{0, 0, displayGeneric, nil, makeStop, ""}, "stop": &handlerData{0, 0, displayGeneric, nil, makeStop, ""},
"submitblock": &handlerData{1, 1, displayGeneric, nil, makeSubmitBlock, "<hexdata> [jsonparametersobject]"}, "submitblock": &handlerData{1, 1, displayGeneric, nil, makeSubmitBlock, "<hexdata> [jsonparametersobject]"},
"verifychain": &handlerData{0, 2, displayJSONDump, []conversionHandler{toInt, toInt}, makeVerifyChain, "[level] [numblocks]"}, "verifychain": &handlerData{0, 2, displayJSONDump, []conversionHandler{toInt, toInt}, makeVerifyChain, "[level] [numblocks]"},
@ -494,6 +495,11 @@ func makeSendRawTransaction(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewSendRawTransactionCmd("btcctl", args[0].(string)) return btcjson.NewSendRawTransactionCmd("btcctl", args[0].(string))
} }
// makeSetTxFee generates the cmd structure for settxfee commands.
func makeSetTxFee(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewSetTxFeeCmd("btcctl", args[0].(int64))
}
// makeStop generates the cmd structure for stop commands. // makeStop generates the cmd structure for stop commands.
func makeStop(args []interface{}) (btcjson.Cmd, error) { func makeStop(args []interface{}) (btcjson.Cmd, error) {
return btcjson.NewStopCmd("btcctl") return btcjson.NewStopCmd("btcctl")