remove ignored output from hub node

This commit is contained in:
Victor Shyba 2021-09-09 04:09:46 -03:00 committed by Victor Shyba
parent cd9a1e8c9e
commit 5061a35e66
2 changed files with 4 additions and 14 deletions

View file

@ -2426,7 +2426,7 @@ class Daemon(metaclass=JSONRPCServerType):
[--new_sdk_server=<new_sdk_server>]
Options:
--name=<name> : (str) claim name (normalized_name)
--name=<name> : (str) claim name (normalized)
--text=<text> : (str) full text search
--claim_id=<claim_id> : (str) full or partial claim id
--claim_ids=<claim_ids> : (list) list of full claim ids

View file

@ -461,25 +461,15 @@ class BlockchainNode:
class HubProcess(asyncio.SubprocessProtocol):
IGNORE_OUTPUT = [
b'keypool keep',
b'keypool reserve',
b'keypool return',
]
def __init__(self):
self.ready = asyncio.Event()
self.stopped = asyncio.Event()
self.log = log.getChild('hub')
def pipe_data_received(self, fd, data):
if self.log and not any(ignore in data for ignore in self.IGNORE_OUTPUT):
if b'Error:' in data:
self.log.error(data.decode())
else:
self.log.info(data.decode())
if b'Error:' in data:
if self.log:
self.log.info(data.decode())
if b'error' in data.lower():
self.ready.set()
raise SystemError(data.decode())
if b'listening on' in data: