diff --git a/CHANGELOG.md b/CHANGELOG.md index 90d2858ad..c5bf53ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ can and probably will change functionality and break backwards compatability at anytime. ## [Unreleased] +### Changed + * Add blockchain status to jsonrpc_status ## [0.8.7] - 2017-02-21 diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index 59fd095b7..9a4e63ac8 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -1116,7 +1116,8 @@ class Daemon(AuthJSONRPCServer): Returns: daemon status """ - has_wallet = self.session and self.session.wallet + # on startup, the wallet or network won't be available but we still need this call to work + has_wallet = self.session and self.session.wallet and self.session.wallet.network local_height = self.session.wallet.network.get_local_height() if has_wallet else 0 remote_height = self.session.wallet.network.get_server_height() if has_wallet else 0 best_hash = (yield self.session.wallet.get_best_blockhash()) if has_wallet else None