mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 08:06:05 -04: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:
parent
cdfa2e58df
commit
2ec455df1f
7 changed files with 94 additions and 63 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue