Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catchpoints: log ledger download failures #6227

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion catchup/catchpointService.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,18 @@
start := time.Now()
err0 = lf.downloadLedger(cs.ctx, peer, round)
if err0 == nil {
cs.log.Infof("ledger downloaded in %d seconds", time.Since(start)/time.Second)
cs.log.Infof("ledger downloaded from %s in %d seconds", peerAddress(peer), time.Since(start)/time.Second)

Check warning on line 320 in catchup/catchpointService.go

View check run for this annotation

Codecov / codecov/patch

catchup/catchpointService.go#L320

Added line #L320 was not covered by tests
start = time.Now()
err0 = cs.ledgerAccessor.BuildMerkleTrie(cs.ctx, cs.updateVerifiedCounts)
if err0 == nil {
cs.log.Infof("built merkle trie in %d seconds", time.Since(start)/time.Second)
break
}
// failed to build the merkle trie for the above catchpoint file.
cs.log.Infof("failed to build merkle trie for catchpoint file from %s: %v", peerAddress(peer), err0)

Check warning on line 328 in catchup/catchpointService.go

View check run for this annotation

Codecov / codecov/patch

catchup/catchpointService.go#L328

Added line #L328 was not covered by tests
cs.blocksDownloadPeerSelector.rankPeer(psp, peerRankInvalidDownload)
} else {
cs.log.Infof("failed to download catchpoint ledger from peer %s: %v", peerAddress(peer), err0)

Check warning on line 331 in catchup/catchpointService.go

View check run for this annotation

Codecov / codecov/patch

catchup/catchpointService.go#L331

Added line #L331 was not covered by tests
cs.blocksDownloadPeerSelector.rankPeer(psp, peerRankDownloadFailed)
}

Expand Down
Loading