fix log spamming
This commit is contained in:
parent
c95d4b2685
commit
954f5d793d
@ -83,7 +83,7 @@ def stream_from_peers():
|
||||
|
||||
while stream_times >= stream_counter:
|
||||
stream_counter += 1
|
||||
logger.debug("Reading block of id in stream with " + peer.transport_address, terminal=True)
|
||||
#logger.debug("Reading block of id in stream with " + peer.transport_address, terminal=True)
|
||||
sock.settimeout(5)
|
||||
block_id = sock.recv(BLOCK_ID_SIZE)
|
||||
if blockdb.has_block(block_id):
|
||||
@ -100,7 +100,7 @@ def stream_from_peers():
|
||||
f"Peer {peer.transport_address} " +
|
||||
"reported block size out of range")
|
||||
break
|
||||
|
||||
|
||||
sock.settimeout(5)
|
||||
block_data = sock.recv(block_size)
|
||||
|
||||
@ -130,7 +130,7 @@ def stream_from_peers():
|
||||
|
||||
# spawn stream threads infinitely
|
||||
while True:
|
||||
|
||||
|
||||
available_set = gossip_peer_set - tried_peers
|
||||
if not len(available_set) and len(tried_peers):
|
||||
try:
|
||||
@ -157,4 +157,4 @@ def stream_from_peers():
|
||||
except IndexError:
|
||||
need_socket_lock.release()
|
||||
break
|
||||
|
||||
|
||||
|
@ -35,13 +35,13 @@ async def accept_stem_blocks(
|
||||
|
||||
for _ in range(MAX_STEM_BLOCKS_PER_STREAM):
|
||||
read_routine = reader.readexactly(BLOCK_ID_SIZE)
|
||||
logger.debug(f"Reading block id in stem server", terminal=True)
|
||||
#logger.debug(f"Reading block id in stem server", terminal=True)
|
||||
block_id = await wait_for(read_routine, base_wait_timeout)
|
||||
block_id = block_id.decode('utf-8')
|
||||
if not block_id:
|
||||
break
|
||||
|
||||
logger.debug(f"Reading block size in stem server", terminal=True)
|
||||
#logger.debug(f"Reading block size in stem server", terminal=True)
|
||||
block_size = (await wait_for(
|
||||
reader.readexactly(BLOCK_SIZE_LEN),
|
||||
base_wait_timeout)).decode('utf-8')
|
||||
@ -54,7 +54,7 @@ async def accept_stem_blocks(
|
||||
if block_size > BLOCK_MAX_SIZE:
|
||||
raise ValueError("Max block size")
|
||||
|
||||
logger.debug(f"Reading block of size {block_size} in stem server", terminal=True)
|
||||
#logger.debug(f"Reading block of size {block_size} in stem server", terminal=True)
|
||||
|
||||
raw_block: bytes = await wait_for(
|
||||
reader.readexactly(block_size), base_wait_timeout * 6)
|
||||
|
Loading…
Reference in New Issue
Block a user