Skip to content

Commit 2b54480

Browse files
authored
Merge pull request #42 from uprendis/feature/suppress-snapsync-warns
Suppress verbosity of snapsync warnings
2 parents 3e25561 + 3cf614f commit 2b54480

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

eth/protocols/snap/sync.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import (
2727
"sync"
2828
"time"
2929

30+
"golang.org/x/crypto/sha3"
31+
3032
"github.com/ethereum/go-ethereum/common"
3133
"github.com/ethereum/go-ethereum/common/math"
3234
"github.com/ethereum/go-ethereum/core/rawdb"
@@ -40,7 +42,6 @@ import (
4042
"github.com/ethereum/go-ethereum/p2p/msgrate"
4143
"github.com/ethereum/go-ethereum/rlp"
4244
"github.com/ethereum/go-ethereum/trie"
43-
"golang.org/x/crypto/sha3"
4445
)
4546

4647
var (
@@ -2222,7 +2223,7 @@ func (s *Syncer) OnAccounts(peer SyncPeer, id uint64, hashes []common.Hash, acco
22222223
req, ok := s.accountReqs[id]
22232224
if !ok {
22242225
// Request stale, perhaps the peer timed out but came through in the end
2225-
logger.Warn("Unexpected account range packet")
2226+
logger.Debug("Unexpected account range packet")
22262227
s.lock.Unlock()
22272228
return nil
22282229
}
@@ -2334,7 +2335,7 @@ func (s *Syncer) onByteCodes(peer SyncPeer, id uint64, bytecodes [][]byte) error
23342335
req, ok := s.bytecodeReqs[id]
23352336
if !ok {
23362337
// Request stale, perhaps the peer timed out but came through in the end
2337-
logger.Warn("Unexpected bytecode packet")
2338+
logger.Debug("Unexpected bytecode packet")
23382339
s.lock.Unlock()
23392340
return nil
23402341
}
@@ -2443,7 +2444,7 @@ func (s *Syncer) OnStorage(peer SyncPeer, id uint64, hashes [][]common.Hash, slo
24432444
req, ok := s.storageReqs[id]
24442445
if !ok {
24452446
// Request stale, perhaps the peer timed out but came through in the end
2446-
logger.Warn("Unexpected storage ranges packet")
2447+
logger.Debug("Unexpected storage ranges packet")
24472448
s.lock.Unlock()
24482449
return nil
24492450
}
@@ -2570,7 +2571,7 @@ func (s *Syncer) OnTrieNodes(peer SyncPeer, id uint64, trienodes [][]byte) error
25702571
req, ok := s.trienodeHealReqs[id]
25712572
if !ok {
25722573
// Request stale, perhaps the peer timed out but came through in the end
2573-
logger.Warn("Unexpected trienode heal packet")
2574+
logger.Debug("Unexpected trienode heal packet")
25742575
s.lock.Unlock()
25752576
return nil
25762577
}

0 commit comments

Comments
 (0)