good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 1612267a authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

eth/downloader: fix nil droppeer in state sync

parent 72b21db2
No related branches found
No related tags found
No related merge requests found
......@@ -310,7 +310,13 @@ func (s *stateSync) loop() (err error) {
// 2 items are the minimum requested, if even that times out, we've no use of
// this peer at the moment.
log.Warn("Stalling state sync, dropping peer", "peer", req.peer.id)
s.d.dropPeer(req.peer.id)
if s.d.dropPeer == nil {
// The dropPeer method is nil when `--copydb` is used for a local copy.
// Timeouts can occur if e.g. compaction hits at the wrong time, and can be ignored
req.peer.log.Warn("Downloader wants to drop peer, but peerdrop-function is not set", "peer", req.peer.id)
} else {
s.d.dropPeer(req.peer.id)
}
}
// Process all the received blobs and check for stale delivery
delivered, err := s.process(req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment