Unmarshal correct lockunspent outpoints parameter.

This commit is contained in:
Josh Rickmar 2014-06-23 16:51:21 -05:00
parent 370899e1fc
commit 00874b6ec2

View file

@ -4905,7 +4905,7 @@ func (cmd *LockUnspentCmd) UnmarshalJSON(b []byte) error {
optArgs := make([][]TransactionInput, 0, 1) optArgs := make([][]TransactionInput, 0, 1)
if len(r.Params) > 1 { if len(r.Params) > 1 {
var transactions []TransactionInput var transactions []TransactionInput
if err := json.Unmarshal(r.Params[0], &transactions); err != nil { if err := json.Unmarshal(r.Params[1], &transactions); err != nil {
return fmt.Errorf("second optional parameter 'transactions' "+ return fmt.Errorf("second optional parameter 'transactions' "+
"must be a JSON array of transaction input JSON objects: %v", err) "must be a JSON array of transaction input JSON objects: %v", err)
} }