mirror of
https://github.com/monero-project/monero.git
synced 2025-12-21 23:00:49 -08:00
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".
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user