From ac4ada62827e0edfc6d3092b557c269e9a05411d Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 19 Dec 2025 14:32:23 +0800 Subject: [PATCH] eth/downloader: add logs --- eth/downloader/beaconsync.go | 2 ++ eth/downloader/skeleton.go | 1 + 2 files changed, 3 insertions(+) diff --git a/eth/downloader/beaconsync.go b/eth/downloader/beaconsync.go index aa8f9b1615..750c224230 100644 --- a/eth/downloader/beaconsync.go +++ b/eth/downloader/beaconsync.go @@ -61,6 +61,7 @@ func (b *beaconBackfiller) suspend() *types.Header { b.lock.Unlock() if !filling { + log.Debug("Backfiller was inactive") return filled // Return the filled header on the previous sync completion } // A previous filling should be running, though it may happen that it hasn't @@ -73,6 +74,7 @@ func (b *beaconBackfiller) suspend() *types.Header { // Now that we're sure the downloader successfully started up, we can cancel // it safely without running the risk of data races. b.downloader.Cancel() + log.Debug("Backfiller has been suspended") // Sync cycle was just terminated, retrieve and return the last filled header. // Can't use `filled` as that contains a stale value from before cancellation. diff --git a/eth/downloader/skeleton.go b/eth/downloader/skeleton.go index 720cddeb2e..c498ac84ec 100644 --- a/eth/downloader/skeleton.go +++ b/eth/downloader/skeleton.go @@ -1243,6 +1243,7 @@ func (s *skeleton) cleanStales(filled *types.Header) error { if err := batch.Write(); err != nil { log.Crit("Failed to write beacon trim data", "err", err) } + log.Debug("Cleaned stale beacon headers", "start", start, "end", end) return nil }