mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
eth/downloader: add logs
This commit is contained in:
parent
51253bba16
commit
ac4ada6282
2 changed files with 3 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ func (b *beaconBackfiller) suspend() *types.Header {
|
||||||
b.lock.Unlock()
|
b.lock.Unlock()
|
||||||
|
|
||||||
if !filling {
|
if !filling {
|
||||||
|
log.Debug("Backfiller was inactive")
|
||||||
return filled // Return the filled header on the previous sync completion
|
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
|
// 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
|
// Now that we're sure the downloader successfully started up, we can cancel
|
||||||
// it safely without running the risk of data races.
|
// it safely without running the risk of data races.
|
||||||
b.downloader.Cancel()
|
b.downloader.Cancel()
|
||||||
|
log.Debug("Backfiller has been suspended")
|
||||||
|
|
||||||
// Sync cycle was just terminated, retrieve and return the last filled header.
|
// 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.
|
// Can't use `filled` as that contains a stale value from before cancellation.
|
||||||
|
|
|
||||||
|
|
@ -1243,6 +1243,7 @@ func (s *skeleton) cleanStales(filled *types.Header) error {
|
||||||
if err := batch.Write(); err != nil {
|
if err := batch.Write(); err != nil {
|
||||||
log.Crit("Failed to write beacon trim data", "err", err)
|
log.Crit("Failed to write beacon trim data", "err", err)
|
||||||
}
|
}
|
||||||
|
log.Debug("Cleaned stale beacon headers", "start", start, "end", end)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue