From fca79139ffe9c8455355487559b4e5e385fdbad8 Mon Sep 17 00:00:00 2001 From: alexliebowitz Date: Thu, 30 Mar 2017 12:55:54 -0400 Subject: [PATCH] Return full LBRY ID and installation ID in jsonrpc_status() Better to let the client decide whether to display the short or long version --- .gitignore | 2 +- CHANGELOG.md | 2 +- lbrynet/lbrynet_daemon/Daemon.py | 4 ++-- tests/mocks.py | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 049067011..74027cd71 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ /docs_build /lbry-venv -.idea/.name +.idea/ .coverage .DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 043939170..2e7310398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ at anytime. * ### Changed - * + * Return full `lbry_id` and `installation_id` from `status` * * diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index c4b7c4a74..111c60ea7 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -1061,8 +1061,8 @@ class Daemon(AuthJSONRPCServer): best_hash = (yield self.session.wallet.get_best_blockhash()) if has_wallet else None response = { - 'lbry_id': base58.b58encode(self.lbryid)[:SHORT_ID_LEN], - 'installation_id': conf.settings.get_installation_id()[:SHORT_ID_LEN], + 'lbry_id': base58.b58encode(self.lbryid), + 'installation_id': conf.settings.installation_id, 'is_running': self.announced_startup, 'is_first_run': self.session.wallet.is_first_run if has_wallet else None, 'startup_status': { diff --git a/tests/mocks.py b/tests/mocks.py index 3a5d1511b..63daea1a0 100644 --- a/tests/mocks.py +++ b/tests/mocks.py @@ -247,6 +247,7 @@ create_stream_sd_file = { def mock_conf_settings(obj, settings={}): original_settings = conf.settings conf.settings = conf.Config(conf.FIXED_SETTINGS, conf.ADJUSTABLE_SETTINGS) + conf.settings.installation_id = conf.settings.get_installation_id() conf.settings.update(settings) def _reset_settings():