From a429bebbbaaceb5912220f7851e2da4cba8f2c02 Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 20 Aug 2014 12:06:17 -0400 Subject: [PATCH] Pass the correct types for signrawtransaction. --- util/btcctl/btcctl.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 0a328fd7..165b8b07 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -779,10 +779,20 @@ func makeSignMessage(args []interface{}) (btcjson.Cmd, error) { func makeSignRawTransaction(args []interface{}) (btcjson.Cmd, error) { optArgs := make([]interface{}, 0, 3) if len(args) > 1 { - optArgs = append(optArgs, args[1]) + var inputs []btcjson.RawTxInput + err := json.Unmarshal([]byte(args[1].(string)), &inputs) + if err != nil { + return nil, err + } + optArgs = append(optArgs, inputs) } if len(args) > 2 { - optArgs = append(optArgs, args[2]) + var inputs []string + err := json.Unmarshal([]byte(args[2].(string)), &inputs) + if err != nil { + return nil, err + } + optArgs = append(optArgs, inputs) } if len(args) > 3 { optArgs = append(optArgs, args[3])