From de9176b94f38b363fd81b10e747c33b6114b98d3 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 26 Nov 2013 16:21:19 -0500 Subject: [PATCH] Fix listtransactions optarg indexes. --- util/btcctl/btcctl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index fe049cac..bfafb2cd 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -227,13 +227,13 @@ func makeImportPrivKey(args []interface{}) (btcjson.Cmd, error) { // listtransactions commands. func makeListTransactions(args []interface{}) (btcjson.Cmd, error) { var optargs = make([]interface{}, 0, 3) - if len(args) > 1 { + if len(args) > 0 { optargs = append(optargs, args[0].(string)) } - if len(args) > 2 { + if len(args) > 1 { optargs = append(optargs, args[1].(int)) } - if len(args) > 3 { + if len(args) > 2 { optargs = append(optargs, args[2].(int)) }