all: fix typos in comments (#21118)
This commit is contained in:
@ -425,7 +425,7 @@ func (dl *diffLayer) Update(blockRoot common.Hash, destructs map[common.Hash]str
|
||||
|
||||
// flatten pushes all data from this point downwards, flattening everything into
|
||||
// a single diff at the bottom. Since usually the lowermost diff is the largest,
|
||||
// the flattening bulds up from there in reverse.
|
||||
// the flattening builds up from there in reverse.
|
||||
func (dl *diffLayer) flatten() snapshot {
|
||||
// If the parent is not diff, we're the first in line, return unmodified
|
||||
parent, ok := dl.parent.(*diffLayer)
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
)
|
||||
|
||||
// Iterator is a iterator to step over all the accounts or the specific
|
||||
// Iterator is an iterator to step over all the accounts or the specific
|
||||
// storage in a snapshot which may or may not be composed of multiple layers.
|
||||
type Iterator interface {
|
||||
// Next steps the iterator forward one element, returning false if exhausted,
|
||||
@ -47,7 +47,7 @@ type Iterator interface {
|
||||
Release()
|
||||
}
|
||||
|
||||
// AccountIterator is a iterator to step over all the accounts in a snapshot,
|
||||
// AccountIterator is an iterator to step over all the accounts in a snapshot,
|
||||
// which may or may not be composed of multiple layers.
|
||||
type AccountIterator interface {
|
||||
Iterator
|
||||
@ -57,7 +57,7 @@ type AccountIterator interface {
|
||||
Account() []byte
|
||||
}
|
||||
|
||||
// StorageIterator is a iterator to step over the specific storage in a snapshot,
|
||||
// StorageIterator is an iterator to step over the specific storage in a snapshot,
|
||||
// which may or may not be composed of multiple layers.
|
||||
type StorageIterator interface {
|
||||
Iterator
|
||||
@ -250,7 +250,7 @@ type diffStorageIterator struct {
|
||||
func (dl *diffLayer) StorageIterator(account common.Hash, seek common.Hash) (StorageIterator, bool) {
|
||||
// Create the storage for this account even it's marked
|
||||
// as destructed. The iterator is for the new one which
|
||||
// just has the same adddress as the deleted one.
|
||||
// just has the same address as the deleted one.
|
||||
hashes, destructed := dl.StorageList(account)
|
||||
index := sort.Search(len(hashes), func(i int) bool {
|
||||
return bytes.Compare(seek[:], hashes[i][:]) <= 0
|
||||
|
@ -238,7 +238,7 @@ func (fi *fastIterator) next(idx int) bool {
|
||||
fi.iterators = append(fi.iterators[:idx], fi.iterators[idx+1:]...)
|
||||
return len(fi.iterators) > 0
|
||||
}
|
||||
// If there's noone left to cascade into, return
|
||||
// If there's no one left to cascade into, return
|
||||
if idx == len(fi.iterators)-1 {
|
||||
return true
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ func (t *Tree) Cap(root common.Hash, layers int) error {
|
||||
remove(root)
|
||||
}
|
||||
}
|
||||
// If the disk layer was modified, regenerate all the cummulative blooms
|
||||
// If the disk layer was modified, regenerate all the cumulative blooms
|
||||
if persisted != nil {
|
||||
var rebloom func(root common.Hash)
|
||||
rebloom = func(root common.Hash) {
|
||||
|
@ -94,7 +94,7 @@ func wipeKeyRange(db ethdb.KeyValueStore, kind string, prefix []byte, keylen int
|
||||
|
||||
it := db.NewIterator(prefix, nil)
|
||||
for it.Next() {
|
||||
// Skip any keys with the correct prefix but wrong lenth (trie nodes)
|
||||
// Skip any keys with the correct prefix but wrong length (trie nodes)
|
||||
key := it.Key()
|
||||
if !bytes.HasPrefix(key, prefix) {
|
||||
break
|
||||
|
Reference in New Issue
Block a user