// If we've requested the node too many times already, it may be a malicious
// sync where nobody has the right data. Abort.
iflen(task.attempts)>=npeers{
returnsuccessful,fmt.Errorf("state node %s failed with all peers (%d tries, %d peers)",hash.TerminalString(),len(task.attempts),npeers)
returnsuccessful,fmt.Errorf("byte code %s failed with all peers (%d tries, %d peers)",hash.TerminalString(),len(task.attempts),npeers)
}
// Missing item, place into the retry queue.
s.tasks[hash]=task
s.codeTasks[hash]=task
}
returnsuccessful,nil
}
...
...
@@ -533,7 +594,7 @@ func (s *stateSync) updateStats(written, duplicate, unexpected int, duration tim
s.d.syncStatsState.unexpected+=uint64(unexpected)
ifwritten>0||duplicate>0||unexpected>0{
log.Info("Imported new state entries","count",written,"elapsed",common.PrettyDuration(duration),"processed",s.d.syncStatsState.processed,"pending",s.d.syncStatsState.pending,"retry",len(s.tasks),"duplicate",s.d.syncStatsState.duplicate,"unexpected",s.d.syncStatsState.unexpected)
log.Info("Imported new state entries","count",written,"elapsed",common.PrettyDuration(duration),"processed",s.d.syncStatsState.processed,"pending",s.d.syncStatsState.pending,"trieretry",len(s.trieTasks),"coderetry",len(s.codeTasks),"duplicate",s.d.syncStatsState.duplicate,"unexpected",s.d.syncStatsState.unexpected)