From 6f7f3bb3162a88ff9f782197666b94de7dd92c97 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 20 Nov 2018 16:12:51 -0500 Subject: [PATCH] fixes #1653 --- lbrynet/extras/wallet/manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lbrynet/extras/wallet/manager.py b/lbrynet/extras/wallet/manager.py index c4342536c..d482fe580 100644 --- a/lbrynet/extras/wallet/manager.py +++ b/lbrynet/extras/wallet/manager.py @@ -202,8 +202,10 @@ class LbryWalletManager(BaseWalletManager): return manager async def _migrate_addresses(self, receiving_addresses: set, change_addresses: set): - migrated_receiving = set((await self.default_account.receiving.generate_keys(0, len(receiving_addresses)))) - migrated_change = set((await self.default_account.change.generate_keys(0, len(change_addresses)))) + async with self.default_account.receiving.address_generator_lock: + migrated_receiving = set((await self.default_account.receiving._generate_keys(0, len(receiving_addresses)))) + async with self.default_account.change.address_generator_lock: + migrated_change = set((await self.default_account.change._generate_keys(0, len(change_addresses)))) receiving_addresses = set(map(self.default_account.ledger.public_key_to_address, receiving_addresses)) change_addresses = set(map(self.default_account.ledger.public_key_to_address, change_addresses)) if not any(change_addresses.difference(migrated_change)):