Skip to content

Commit

Permalink
Merge pull request ethereum#42 from uprendis/feature/suppress-snapsyn…
Browse files Browse the repository at this point in the history
…c-warns

Suppress verbosity of snapsync warnings
  • Loading branch information
uprendis authored Dec 8, 2022
2 parents 3e25561 + 3cf614f commit 2b54480
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions eth/protocols/snap/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"sync"
"time"

"golang.org/x/crypto/sha3"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core/rawdb"
Expand All @@ -40,7 +42,6 @@ import (
"github.com/ethereum/go-ethereum/p2p/msgrate"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
"golang.org/x/crypto/sha3"
)

var (
Expand Down Expand Up @@ -2222,7 +2223,7 @@ func (s *Syncer) OnAccounts(peer SyncPeer, id uint64, hashes []common.Hash, acco
req, ok := s.accountReqs[id]
if !ok {
// Request stale, perhaps the peer timed out but came through in the end
logger.Warn("Unexpected account range packet")
logger.Debug("Unexpected account range packet")
s.lock.Unlock()
return nil
}
Expand Down Expand Up @@ -2334,7 +2335,7 @@ func (s *Syncer) onByteCodes(peer SyncPeer, id uint64, bytecodes [][]byte) error
req, ok := s.bytecodeReqs[id]
if !ok {
// Request stale, perhaps the peer timed out but came through in the end
logger.Warn("Unexpected bytecode packet")
logger.Debug("Unexpected bytecode packet")
s.lock.Unlock()
return nil
}
Expand Down Expand Up @@ -2443,7 +2444,7 @@ func (s *Syncer) OnStorage(peer SyncPeer, id uint64, hashes [][]common.Hash, slo
req, ok := s.storageReqs[id]
if !ok {
// Request stale, perhaps the peer timed out but came through in the end
logger.Warn("Unexpected storage ranges packet")
logger.Debug("Unexpected storage ranges packet")
s.lock.Unlock()
return nil
}
Expand Down Expand Up @@ -2570,7 +2571,7 @@ func (s *Syncer) OnTrieNodes(peer SyncPeer, id uint64, trienodes [][]byte) error
req, ok := s.trienodeHealReqs[id]
if !ok {
// Request stale, perhaps the peer timed out but came through in the end
logger.Warn("Unexpected trienode heal packet")
logger.Debug("Unexpected trienode heal packet")
s.lock.Unlock()
return nil
}
Expand Down

0 comments on commit 2b54480

Please sign in to comment.