Value getbalance(const Array& params, bool fHelp)
{
- if (fHelp || params.size() > 2)
+ if (fHelp || params.size() > 3)
throw runtime_error(
"getbalance [account] [minconf=1] [watchonly=0]\n"
"If [account] is not specified, returns the server's total available balance.\n"
// Parse address
CScript scriptPubKey;
- string strAddress = params[0].get_str();
+ string strAddress = params[1].get_str();
CBitcoinAddress address(strAddress);
if (address.IsValid())