diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/functional_tests/wallet.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py index 8182cecb2..1cbe4ee68 100755 --- a/tests/functional_tests/wallet.py +++ b/tests/functional_tests/wallet.py @@ -47,6 +47,7 @@ class WalletTest(): self.check_keys() self.create_subaddresses() self.tags() + self.update_lookahead() self.attributes() self.open_close() self.languages() @@ -164,6 +165,20 @@ class WalletTest(): res = wallet.label_account(0, "main") + def update_lookahead(self): + print('Updating subaddress lookahead') + wallet = Wallet() + address_0_999 = '8BQKgTSSqJjP14AKnZUBwnXWj46MuNmLvHfPTpmry52DbfNjjHVvHUk4mczU8nj8yZ57zBhksTJ8kM5xKeJXw55kCMVqyG7' # this is the address for address 999 of the main account in the test wallet + try: # assert address_1_999 is not in the current pubkey table + wallet.get_address_index(address_0_999) + except Exception as e: + assert str(e) == "{'error': {'code': -2, 'message': \"Address doesn't belong to the wallet\"}, 'id': '0', 'jsonrpc': '2.0'}" + # update the lookahead and assert the high index address is now in the table + wallet.set_subaddress_lookahead(50, 1000) + r = wallet.get_address_index(address_0_999) + assert r['index']['major'] == 0 + assert r['index']['minor'] == 999 + def tags(self): print('Testing tags') wallet = Wallet() |
