From 2a45bb3c7c302dc73089cda0127859d4722075af Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 22 Mar 2024 01:26:50 +0100 Subject: [PATCH] add error information when sync requests fail (#6119) During sync it may be interesting to know why requests are failing. Extend debug logging accordingly. --- beacon_chain/sync/sync_manager.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beacon_chain/sync/sync_manager.nim b/beacon_chain/sync/sync_manager.nim index dc1f16205..cbc826910 100644 --- a/beacon_chain/sync/sync_manager.nim +++ b/beacon_chain/sync/sync_manager.nim @@ -392,7 +392,8 @@ proc syncStep[A, B](man: SyncManager[A, B], index: int, peer: A) if blocks.isErr(): peer.updateScore(PeerScoreNoValues) man.queue.push(req) - debug "Failed to receive blocks on request", request = req + debug "Failed to receive blocks on request", + request = req, err = blocks.error return let blockData = blocks.get().asSeq() let blockSmap = getShortMap(req, blockData) @@ -420,7 +421,8 @@ proc syncStep[A, B](man: SyncManager[A, B], index: int, peer: A) if blobs.isErr(): peer.updateScore(PeerScoreNoValues) man.queue.push(req) - debug "Failed to receive blobs on request", request = req + debug "Failed to receive blobs on request", + request = req, err = blobs.error return let blobData = blobs.get().asSeq() let blobSmap = getShortMap(req, blobData)