Merge pull request #438 from lbryio/warn_large_wallet

Add warning for large wallet sizes
This commit is contained in:
Job Evers‐Meltzer 2017-01-24 11:54:53 -05:00 committed by GitHub
commit a90f413f94

View file

@ -946,8 +946,14 @@ class LBRYumWallet(Wallet):
wallet.create_main_account() wallet.create_main_account()
wallet.synchronize() wallet.synchronize()
self.wallet = wallet self.wallet = wallet
self._check_large_wallet()
return defer.succeed(True) return defer.succeed(True)
def _check_large_wallet(self):
if len(self.wallet.addresses(include_change=False)) > 1000:
log.warning("Your wallet is excessively large, please follow instructions here: \
https://github.com/lbryio/lbry/issues/437 to reduce your wallet size")
def _load_blockchain(self): def _load_blockchain(self):
blockchain_caught_d = defer.Deferred() blockchain_caught_d = defer.Deferred()