mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
eth/protocols/snap: fix metrics
This commit is contained in:
parent
17e016fc57
commit
468cf823bb
1 changed files with 6 additions and 5 deletions
|
|
@ -689,11 +689,12 @@ func (s *Syncer) Sync(root common.Hash, cancel chan struct{}) error {
|
|||
if len(s.tasks) == 0 && s.healer.scheduler.Pending() == 0 {
|
||||
// State healing phase completed, record the elapsed time in metrics.
|
||||
// Note: healing may be rerun in subsequent cycles to fill gaps between
|
||||
// pivot states (e.g., if chain sync takes longer). The initial healing
|
||||
// phase is more important for us.
|
||||
// pivot states (e.g., if chain sync takes longer).
|
||||
if !s.healStartTime.IsZero() {
|
||||
stateHealTimeResettingTimer.Update(time.Since(s.healStartTime))
|
||||
log.Info("State healing phase is completed", "elapsed", common.PrettyDuration(time.Since(s.healStartTime)))
|
||||
s.healStartTime = time.Time{} // zero the start time
|
||||
s.healStartTime = time.Time{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// Assign all the data retrieval tasks to any free peers
|
||||
|
|
|
|||
Loading…
Reference in a new issue