Skip to content

Commit b2b0e1d

Browse files
authored
all: fix various typos (#29600)
* core: fix typo * rpc: fix typo * snap: fix typo * trie: fix typo * main: fix typo * abi: fix typo * main: fix field comment for basicOp
1 parent 709e0b3 commit b2b0e1d

File tree

14 files changed

+15
-15
lines changed

14 files changed

+15
-15
lines changed

accounts/abi/type_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/ethereum/go-ethereum/common"
2626
)
2727

28-
// typeWithoutStringer is a alias for the Type type which simply doesn't implement
28+
// typeWithoutStringer is an alias for the Type type which simply doesn't implement
2929
// the stringer interface to allow printing type details in the tests below.
3030
type typeWithoutStringer Type
3131

core/blockchain_insert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (it *insertIterator) current() *types.Header {
170170
return it.chain[it.index].Header()
171171
}
172172

173-
// first returns the first block in the it.
173+
// first returns the first block in it.
174174
func (it *insertIterator) first() *types.Block {
175175
return it.chain[0]
176176
}

core/state/iterator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type nodeIterator struct {
4646
Error error // Failure set in case of an internal error in the iterator
4747
}
4848

49-
// newNodeIterator creates an post-order state node iterator.
49+
// newNodeIterator creates a post-order state node iterator.
5050
func newNodeIterator(state *StateDB) *nodeIterator {
5151
return &nodeIterator{
5252
state: state,

core/state/snapshot/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type generatorStats struct {
4646
storage common.StorageSize // Total account and storage slot size(generation or recovery)
4747
}
4848

49-
// Log creates an contextual log with the given message and the context pulled
49+
// Log creates a contextual log with the given message and the context pulled
5050
// from the internally maintained statistics.
5151
func (gs *generatorStats) Log(msg string, root common.Hash, marker []byte) {
5252
var ctx []interface{}

core/state/snapshot/iterator_binary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (dl *diffLayer) initBinaryStorageIterator(account common.Hash) Iterator {
6868
parent, ok := dl.parent.(*diffLayer)
6969
if !ok {
7070
// If the storage in this layer is already destructed, discard all
71-
// deeper layers but still return an valid single-branch iterator.
71+
// deeper layers but still return a valid single-branch iterator.
7272
a, destructed := dl.StorageIterator(account, common.Hash{})
7373
if destructed {
7474
l := &binaryIterator{
@@ -92,7 +92,7 @@ func (dl *diffLayer) initBinaryStorageIterator(account common.Hash) Iterator {
9292
return l
9393
}
9494
// If the storage in this layer is already destructed, discard all
95-
// deeper layers but still return an valid single-branch iterator.
95+
// deeper layers but still return a valid single-branch iterator.
9696
a, destructed := dl.StorageIterator(account, common.Hash{})
9797
if destructed {
9898
l := &binaryIterator{

core/state/snapshot/iterator_fast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/ethereum/go-ethereum/common"
2626
)
2727

28-
// weightedIterator is a iterator with an assigned weight. It is used to prioritise
28+
// weightedIterator is an iterator with an assigned weight. It is used to prioritise
2929
// which account or storage slot is the correct one if multiple iterators find the
3030
// same one (modified in multiple consecutive blocks).
3131
type weightedIterator struct {

core/state/snapshot/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ func (t *Tree) disklayer() *diskLayer {
835835
}
836836
}
837837

838-
// diskRoot is a internal helper function to return the disk layer root.
838+
// diskRoot is an internal helper function to return the disk layer root.
839839
// The lock of snapTree is assumed to be held already.
840840
func (t *Tree) diskRoot() common.Hash {
841841
disklayer := t.disklayer()

core/state/state_object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func (s *stateObject) updateTrie() (Trie, error) {
376376
// new storage trie root.
377377
func (s *stateObject) updateRoot() {
378378
// Flush cached storage mutations into trie, short circuit if any error
379-
// is occurred or there is not change in the trie.
379+
// is occurred or there is no change in the trie.
380380
tr, err := s.updateTrie()
381381
if err != nil || tr == nil {
382382
return

eth/protocols/snap/gentrie.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (t *pathTrie) onTrieNode(path []byte, hash common.Hash, blob []byte) {
132132
//
133133
// The extension node is detected if its path is the prefix of last committed
134134
// one and path gap is larger than one. If the path gap is only one byte,
135-
// the current node could either be a full node, or a extension with single
135+
// the current node could either be a full node, or an extension with single
136136
// byte key. In either case, no gaps will be left in the path.
137137
if t.last != nil && bytes.HasPrefix(t.last, path) && len(t.last)-len(path) > 1 {
138138
for i := len(path) + 1; i < len(t.last); i++ {

rlp/rlpgen/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ type op interface {
158158
// basicOp handles basic types bool, uint*, string.
159159
type basicOp struct {
160160
typ types.Type
161-
writeMethod string // calle write the value
161+
writeMethod string // EncoderBuffer writer method name
162162
writeArgType types.Type // parameter type of writeMethod
163163
decMethod string
164164
decResultType types.Type // return type of decMethod

0 commit comments

Comments
 (0)