From 407e3514cc705caf25d807c5933b1b638d1e832f Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 13 May 2019 23:20:48 +0200 Subject: [PATCH] wallet: test_addresses_sanity to include (part of) address in exception related: #5342 --- electrum/wallet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/electrum/wallet.py b/electrum/wallet.py index 47cde1d8e..a3837952a 100644 --- 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: