aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-10 17:20:20 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-05 11:19:34 +0000
commit2ec455df1f82148733c4ac268d22e9c51a690b14 (patch)
treedd0fe1637a7ba7a060b1a97966585bd9d6b87a8f /utils
parentMerge pull request #5827 (diff)
downloadmonero-2ec455df1f82148733c4ac268d22e9c51a690b14.tar.xz
wallet: fix mismatch between two concepts of "balance"
One considers the blockchain, while the other considers the blockchain and some recent actions, such as a recently created transaction which spend some outputs, but isn't yet mined. Typically, the "balance" command wants the latter, to reflect the recent action, but things like proving ownership wants the former. This fixes a crash in get_reserve_proof, where a preliminary check and the main code used two concepts of "balance".
Diffstat (limited to 'utils')
-rw-r--r--utils/python-rpc/framework/wallet.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index 36ff3644f..3bbb8b151 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -140,13 +140,14 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(create_wallet)
- def get_balance(self, account_index = 0, address_indices = [], all_accounts = False):
+ def get_balance(self, account_index = 0, address_indices = [], all_accounts = False, strict = False):
get_balance = {
'method': 'get_balance',
'params': {
'account_index': account_index,
'address_indices': address_indices,
'all_accounts': all_accounts,
+ 'strict': strict,
},
'jsonrpc': '2.0',
'id': '0'