In commit “[RPC] [wallet] allow getbalance to use min_conf and watch_only”
I think the safest thing here would be to raise an error whenever accounts are deprecated and account is non-null, because previously getbalance(null)
, getbalance("*")
, and getbalance("")
each did different things, and it doesn’t seem good to silently ignore a requested behavior. Another slightly less safe but maybe acceptable option would be to change ""
to "*"
on this line, since getbalance("*")
and getbalance(null)
at least were more similar than getbalance("*")
and getbalance("")
Previously, and currently with the deprecated accounts feature enabled:
getbalance(null)
would return total balance
getbalance("*")
would return total balance with legacy accounting method
getbalance("account")
would return balance associated with a named account
getbalance("")
would return leftover balance not associated with any named accounts