aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-01-18 14:35:50 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-01-18 14:35:50 -0500
commitb4671902f2c5aa1c95be547a61b0a72b8a3025de (patch)
treec9de69cd651024487fed16ec890e20ef1e721202 /rpc.cpp
parent76e97c40028b544e54df017382679e8b954bb9b5 (diff)
parent2eb09b66efba479acd6a7043ac42456c8733dce9 (diff)
Merge branch 'listaccountsbug' of https://github.com/gavinandresen/bitcoin-git into integration
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc.cpp b/rpc.cpp
index 7dee74c50d..f80b24ea72 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -1029,8 +1029,8 @@ Value listaccounts(const Array& params, bool fHelp)
"Returns Object that has account names as keys, account balances as values.");
int nMinDepth = 1;
- if (params.size() > 1)
- nMinDepth = params[1].get_int();
+ if (params.size() > 0)
+ nMinDepth = params[0].get_int();
map<string, int64> mapAccountBalances;
CRITICAL_BLOCK(cs_mapWallet)
@@ -1954,7 +1954,7 @@ int CommandLineRPC(int argc, char *argv[])
if (strMethod == "sendfrom" && n > 2) ConvertTo<double>(params[2]);
if (strMethod == "sendfrom" && n > 3) ConvertTo<boost::int64_t>(params[3]);
if (strMethod == "listtransactions" && n > 1) ConvertTo<boost::int64_t>(params[1]);
- if (strMethod == "listaccounts" && n > 1) ConvertTo<boost::int64_t>(params[1]);
+ if (strMethod == "listaccounts" && n > 0) ConvertTo<boost::int64_t>(params[0]);
// Execute
Object reply = CallRPC(strMethod, params);