diff --git a/core/state/state_object.go b/core/state/state_object.go index 85cb8b44de..4011425c2a 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -127,7 +127,7 @@ func (s *stateObject) touch() { } } -// getTrie returns the associated storage trie. The trie will be opened if it' +// getTrie returns the associated storage trie. The trie will be opened if it's // not loaded previously. An error will be returned if trie can't be loaded. // // If a new trie is opened, it will be cached within the state object to allow @@ -156,7 +156,7 @@ func (s *stateObject) getPrefetchedTrie() (Trie, error) { if s.data.Root == types.EmptyRootHash || s.db.prefetcher == nil { return nil, nil } - // Attempt to retrieve the trie from the pretecher + // Attempt to retrieve the trie from the prefetcher return s.db.prefetcher.trie(s.addrHash, s.data.Root) } @@ -311,7 +311,7 @@ func (s *stateObject) updateTrie() (Trie, error) { if len(s.pendingStorage) == 0 { return s.trie, nil } - // Retrieve a pretecher populated trie, or fall back to the database + // Retrieve a prefetcher populated trie, or fall back to the database tr, err := s.getPrefetchedTrie() switch { case err != nil: diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index 7e08964e41..0b45660ac1 100644 --- a/core/state/trie_prefetcher.go +++ b/core/state/trie_prefetcher.go @@ -72,7 +72,7 @@ func newTriePrefetcher(db Database, root common.Hash, namespace string) *triePre } } -// terminate iterates over all the subfetchers and issues a terminateion request +// terminate iterates over all the subfetchers and issues a termination request // to all of them. Depending on the async parameter, the method will either block // until all subfetchers spin down, or return immediately. func (p *triePrefetcher) terminate(async bool) { @@ -234,7 +234,7 @@ func (sf *subfetcher) schedule(keys [][]byte) error { case sf.wake <- struct{}{}: // Wake signal sent default: - // Wake signal not sent as a previous is already queued + // Wake signal not sent as a previous one is already queued } return nil } @@ -250,7 +250,7 @@ func (sf *subfetcher) wait() { // peeks for the original data. The method will block until all the scheduled // data has been loaded and the fethcer terminated. func (sf *subfetcher) peek() Trie { - // Block until the fertcher terminates, then retrieve the trie + // Block until the fetcher terminates, then retrieve the trie sf.wait() return sf.trie } @@ -296,7 +296,7 @@ func (sf *subfetcher) loop() { for { select { case <-sf.wake: - // Execute all remaining tasks in single run + // Execute all remaining tasks in a single run sf.lock.Lock() tasks := sf.tasks sf.tasks = nil