commit c13e05770150c5210783c3d42d3d2b1a683f18b4
parent df6f950b2d10c9fb1090ee4a65326e45a580588e
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 9 Mar 2018 03:18:53 +0100
fix #4080
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -200,6 +200,8 @@ class Abstract_Wallet(PrintError):
self.load_transactions()
self.build_spent_outpoints()
+ self.test_addresses_sanity()
+
# load requests
self.receive_requests = self.storage.get('payment_requests', {})
@@ -329,6 +331,12 @@ class Abstract_Wallet(PrintError):
self.receiving_addresses = d.get('receiving', [])
self.change_addresses = d.get('change', [])
+ def test_addresses_sanity(self):
+ addrs = self.get_receiving_addresses()
+ if len(addrs) > 0:
+ if not bitcoin.is_address(addrs[0]):
+ raise Exception('The addresses in this wallet are not bitcoin addresses.')
+
def synchronize(self):
pass