From 9d272befcdbaf4506df03407aa16aa2ba3647888 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 23 Nov 2016 20:28:16 -0500 Subject: [PATCH] Convert length of shortened plaintext LBRY ID to constant --- lbrynet/lbrynet_daemon/Daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index ed9198482..e9cccef0d 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -96,7 +96,7 @@ NOT_FOUND = 404 OK_CODE = 200 PENDING_LBRY_ID = "not set" - +SHORT_LBRY_ID_LEN = 20 class Checker: """The looping calls the daemon runs""" @@ -586,7 +586,7 @@ class Daemon(AuthJSONRPCServer): def _upload_log(self, log_type=None, exclude_previous=False, force=False): if self.upload_log or force: if self.lbryid is not PENDING_LBRY_ID: - id_hash = base58.b58encode(self.lbryid)[:20] + id_hash = base58.b58encode(self.lbryid)[:SHORT_LBRY_ID_LEN] else: id_hash = self.lbryid try: