Skip to content

Commit 023a686

Browse files
authored
catchpoints: log ledger download failures (algorand#6227)
1 parent c60db8d commit 023a686

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

catchup/catchpointService.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,18 @@ func (cs *CatchpointCatchupService) processStageLedgerDownload() error {
317317
start := time.Now()
318318
err0 = lf.downloadLedger(cs.ctx, peer, round)
319319
if err0 == nil {
320-
cs.log.Infof("ledger downloaded in %d seconds", time.Since(start)/time.Second)
320+
cs.log.Infof("ledger downloaded from %s in %d seconds", peerAddress(peer), time.Since(start)/time.Second)
321321
start = time.Now()
322322
err0 = cs.ledgerAccessor.BuildMerkleTrie(cs.ctx, cs.updateVerifiedCounts)
323323
if err0 == nil {
324324
cs.log.Infof("built merkle trie in %d seconds", time.Since(start)/time.Second)
325325
break
326326
}
327327
// failed to build the merkle trie for the above catchpoint file.
328+
cs.log.Infof("failed to build merkle trie for catchpoint file from %s: %v", peerAddress(peer), err0)
328329
cs.blocksDownloadPeerSelector.rankPeer(psp, peerRankInvalidDownload)
329330
} else {
331+
cs.log.Infof("failed to download catchpoint ledger from peer %s: %v", peerAddress(peer), err0)
330332
cs.blocksDownloadPeerSelector.rankPeer(psp, peerRankDownloadFailed)
331333
}
332334

0 commit comments

Comments
 (0)