From 8795e1a74624199c656dde5a6e07fc054ecbab23 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 25 Jun 2014 10:53:06 +0200 Subject: [PATCH] Comment on wallet classes. Use address_is_old to check if address is beyond gap limit --- lib/wallet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/wallet.py b/lib/wallet.py index eb9a03954..467a11c21 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -128,6 +128,10 @@ class WalletStorage: class Abstract_Wallet: + """ + Wallet classes are created to handle various address generation methods. + Completion states (watching-only, single account, no seed, etc) are handled inside classes. + """ def __init__(self, storage): self.storage = storage @@ -1252,8 +1256,7 @@ class Deterministic_Wallet(Abstract_Wallet): return False prev_addresses = prev_addresses[max(0, i - limit):] for addr in prev_addresses: - num, is_used = self.is_used(addr) - if num > 0: + if self.address_is_old(addr): return False return True