twallet: test_addresses_sanity to include (part of) address in exception - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 407e3514cc705caf25d807c5933b1b638d1e832f DIR parent 4db1535bceeb58bfb8e46d83de45fa56cca352b2 HTML 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: M electrum/wallet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/wallet.py b/electrum/wallet.py t@@ -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: