From ece218785ca8892b7d415db92649ba0006ee67c0 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 17 Aug 2016 20:20:03 -0400 Subject: [PATCH 1/2] reduce logging to sub fire hazard levels --- lbrynet/core/log_support.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lbrynet/core/log_support.py b/lbrynet/core/log_support.py index cc6bba682..54a5a03a1 100644 --- a/lbrynet/core/log_support.py +++ b/lbrynet/core/log_support.py @@ -77,6 +77,9 @@ def disable_third_party_loggers(): def disable_noisy_loggers(): logging.getLogger('lbrynet.dht').setLevel(logging.INFO) + logging.getLogger('lbrynet.core.client.ConnectionManager').setLevel(logging.INFO) + logging.getLogger('lbrynet.core.client.BlobRequester').setLevel(logging.INFO) + logging.getLogger('lbrynet.core.client.ClientProtocol').setLevel(logging.INFO) @_log_decorator From 929db152143c95c203b5226b70d7c12e173e9db6 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 18 Aug 2016 22:15:49 -0400 Subject: [PATCH 2/2] fix get_history in lbrycrdwallet --- lbrynet/core/LBRYWallet.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lbrynet/core/LBRYWallet.py b/lbrynet/core/LBRYWallet.py index 0bc584aca..7d275278b 100644 --- a/lbrynet/core/LBRYWallet.py +++ b/lbrynet/core/LBRYWallet.py @@ -489,6 +489,10 @@ class LBRYWallet(object): d.addCallback(self._get_decoded_tx) return d + def get_history(self): + d = self._get_history() + return d + def get_name_and_validity_for_sd_hash(self, sd_hash): d = self._get_claim_metadata_for_sd_hash(sd_hash) d.addCallback(lambda name_txid: self._get_status_of_claim(name_txid[1], name_txid[0], sd_hash) if name_txid is not None else None) @@ -688,6 +692,9 @@ class LBRYWallet(object): def _get_balance_for_address(self, address): return defer.fail(NotImplementedError()) + def _get_history(self): + return defer.fail(NotImplementedError()) + def _start(self): pass @@ -823,6 +830,9 @@ class LBRYcrdWallet(LBRYWallet): def _get_value_for_name(self, name): return threads.deferToThread(self._get_value_for_name_rpc, name) + def _get_history(self): + return threads.deferToThread(self._list_transactions_rpc) + def _get_rpc_conn(self): return AuthServiceProxy(self.rpc_conn_string) @@ -1007,6 +1017,11 @@ class LBRYcrdWallet(LBRYWallet): rpc_conn = self._get_rpc_conn() return rpc_conn.getbestblockhash() + @_catch_connection_error + def _list_transactions_rpc(self): + rpc_conn = self._get_rpc_conn() + return rpc_conn.listtransactions() + @_catch_connection_error def _stop_rpc(self): # check if our lbrycrdd is actually running, or if we connected to one that was already @@ -1294,7 +1309,7 @@ class LBRYumWallet(LBRYWallet): func = getattr(self.cmd_runner, cmd.name) return threads.deferToThread(func) - def get_history(self): + def _get_history(self): cmd = known_commands['history'] func = getattr(self.cmd_runner, cmd.name) return threads.deferToThread(func)