electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 407e3514cc705caf25d807c5933b1b638d1e832f
parent 4db1535bceeb58bfb8e46d83de45fa56cca352b2
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 13 May 2019 23:20:48 +0200

wallet: test_addresses_sanity to include (part of) address in exception

related: #5342

Diffstat:
Melectrum/wallet.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/electrum/wallet.py b/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: