eth/protocols/snap: downgrade log levels for storage retrieval messages

Downgrade `log.Info` to `log.Debug` and `log.Error` to `log.Warn` for suspended storage retrieval logs in snap sync, as marked by the TODO comments
This commit is contained in:
Tanvir 2026-04-28 23:55:56 +08:00
parent 01036bed83
commit 57b5c6d8d9

View file

@ -1998,15 +1998,13 @@ func (s *Syncer) processAccountResponse(res *accountResponse) {
// The hash of last delivered account in the response // The hash of last delivered account in the response
last := res.hashes[len(res.hashes)-1] last := res.hashes[len(res.hashes)-1]
for hash := range res.task.SubTasks { for hash := range res.task.SubTasks {
// TODO(rjl493456442) degrade the log level before merging.
if hash.Cmp(last) > 0 { if hash.Cmp(last) > 0 {
log.Info("Keeping suspended storage retrieval", "account", hash) log.Debug("Keeping suspended storage retrieval", "account", hash)
continue continue
} }
// TODO(rjl493456442) degrade the log level before merging.
// It should never happen in ethereum. // It should never happen in ethereum.
if _, ok := resumed[hash]; !ok { if _, ok := resumed[hash]; !ok {
log.Error("Aborting suspended storage retrieval", "account", hash) log.Warn("Aborting suspended storage retrieval", "account", hash)
delete(res.task.SubTasks, hash) delete(res.task.SubTasks, hash)
largeStorageDiscardGauge.Inc(1) largeStorageDiscardGauge.Inc(1)
} }