mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-27 17:46:28 -04:00
Better logging for RPI error
This commit is contained in:
committed by
Gene Hoffman
parent
055ac0b1da
commit
ebe86ba3e4
@@ -236,8 +236,12 @@ class FullNode:
|
||||
responses = []
|
||||
while curr_sub_height > peak_sub_height - 5:
|
||||
curr = await peer.request_sub_block(full_node_protocol.RequestSubBlock(uint32(curr_sub_height), True))
|
||||
if curr is None:
|
||||
raise ValueError(f"Failed to fetch sub block {curr_sub_height} from {peer.get_peer_info()}, timed out")
|
||||
if curr is None or not isinstance(curr, full_node_protocol.RespondSubBlock):
|
||||
raise ValueError(f"Failed to fetch sub block {curr_sub_height} from {peer.get_peer_info()}")
|
||||
raise ValueError(
|
||||
f"Failed to fetch sub block {curr_sub_height} from {peer.get_peer_info()}, wrong type {type(curr)}"
|
||||
)
|
||||
responses.append(curr)
|
||||
if self.blockchain.contains_sub_block(curr.sub_block.prev_header_hash) or curr_sub_height == 0:
|
||||
found_fork_point = True
|
||||
|
||||
@@ -359,7 +359,7 @@ class ChiaServer:
|
||||
except Exception as e:
|
||||
if self.connection_close_task is None:
|
||||
tb = traceback.format_exc()
|
||||
connection.log.error(f"Exception: {e}, closing connection {connection}. {tb}")
|
||||
connection.log.error(f"Exception: {e}, closing connection {connection.get_peer_info()}. {tb}")
|
||||
else:
|
||||
connection.log.debug(f"Exception: {e} while closing connection")
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user