@@ -31,7 +31,7 @@ import (
3131 "github.com/ethereum/go-ethereum/trie"
3232)
3333
34- // stateReq represents a batch of state fetch requests groupped together into
34+ // stateReq represents a batch of state fetch requests grouped together into
3535// a single data retrieval network packet.
3636type stateReq struct {
3737 items []common.Hash // Hashes of the state items to download
@@ -139,7 +139,7 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
139139
140140 // Handle incoming state packs:
141141 case pack := <- d .stateCh :
142- // Discard any data not requested (or previsouly timed out)
142+ // Discard any data not requested (or previously timed out)
143143 req := active [pack .PeerId ()]
144144 if req == nil {
145145 log .Debug ("Unrequested node data" , "peer" , pack .PeerId (), "len" , pack .Items ())
@@ -182,7 +182,7 @@ func (d *Downloader) runStateSync(s *stateSync) *stateSync {
182182 case req := <- d .trackStateReq :
183183 // If an active request already exists for this peer, we have a problem. In
184184 // theory the trie node schedule must never assign two requests to the same
185- // peer. In practive however, a peer might receive a request, disconnect and
185+ // peer. In practice however, a peer might receive a request, disconnect and
186186 // immediately reconnect before the previous times out. In this case the first
187187 // request is never honored, alas we must not silently overwrite it, as that
188188 // causes valid requests to go missing and sync to get stuck.
@@ -228,7 +228,7 @@ type stateSync struct {
228228 err error // Any error hit during sync (set before completion)
229229}
230230
231- // stateTask represents a single trie node download taks , containing a set of
231+ // stateTask represents a single trie node download task , containing a set of
232232// peers already attempted retrieval from to detect stalled syncs and abort.
233233type stateTask struct {
234234 attempts map [string ]struct {}
@@ -333,7 +333,7 @@ func (s *stateSync) commit(force bool) error {
333333 return nil
334334}
335335
336- // assignTasks attempts to assing new tasks to all idle peers, either from the
336+ // assignTasks attempts to assign new tasks to all idle peers, either from the
337337// batch currently being retried, or fetching new data from the trie sync itself.
338338func (s * stateSync ) assignTasks () {
339339 // Iterate over all idle peers and try to assign them state fetches
0 commit comments