From dffaf745ecb641056d6f40dac4b12fcdf6a90e89 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Mon, 24 Apr 2017 00:19:46 -0400 Subject: [PATCH] wait for wallet subscriptions --- CHANGELOG.md | 3 ++- lbrynet/core/Wallet.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fca2eb1f..7c0a08523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,8 @@ at anytime. ### Changed * Added optional `address` and `include_unconfirmed` params to `jsonrpc_wallet_balance` method - + * Wait for subscriptions before announcing wallet has finished starting + ### Fixed * fix stream_cost_estimate throwing exception on non decodeable claims * diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index 2a3808900..dd5c8507e 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -913,6 +913,9 @@ class LBRYumWallet(Wallet): d.addCallback(lambda _: self._start_check.start(.1)) d.addCallback(lambda _: network_start_d) d.addCallback(lambda _: self._load_blockchain()) + d.addCallback(lambda _: log.info("Subscribing to addresses")) + d.addCallback(lambda _: self.wallet.wait_until_synchronized(lambda _: None)) + d.addCallback(lambda _: log.info("Synchronized wallet")) return d def _stop(self):