Browse Source
wallet: test_addresses_sanity to include (part of) address in exception
related: #5342
regtest_lnd
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
2 deletions
-
electrum/wallet.py
|
|
@ -255,8 +255,11 @@ class Abstract_Wallet(AddressSynchronizer): |
|
|
|
def test_addresses_sanity(self): |
|
|
|
addrs = self.get_receiving_addresses() |
|
|
|
if len(addrs) > 0: |
|
|
|
if not bitcoin.is_address(addrs[0]): |
|
|
|
raise WalletFileException('The addresses in this wallet are not bitcoin addresses.') |
|
|
|
addr = str(addrs[0]) |
|
|
|
if not bitcoin.is_address(addr): |
|
|
|
neutered_addr = addr[:5] + '..' + addr[-2:] |
|
|
|
raise WalletFileException(f'The addresses in this wallet are not bitcoin addresses.\n' |
|
|
|
f'e.g. {neutered_addr} (length: {len(addr)})') |
|
|
|
|
|
|
|
def calc_unused_change_addresses(self): |
|
|
|
with self.lock: |
|
|
|