Skip to content

Commit 8fd43c8

Browse files
authored
all: fix typos in comments (#28881)
1 parent 8ec638d commit 8fd43c8

File tree

27 files changed

+45
-45
lines changed

27 files changed

+45
-45
lines changed

accounts/abi/abi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
// The ABI holds information about a contract's context and available
32-
// invokable methods. It will allow you to type check function calls and
32+
// invocable methods. It will allow you to type check function calls and
3333
// packs data accordingly.
3434
type ABI struct {
3535
Constructor Method

accounts/scwallet/hub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func (hub *Hub) refreshWallets() {
241241
card.Disconnect(pcsc.LeaveCard)
242242
continue
243243
}
244-
// Card connected, start tracking in amongs the wallets
244+
// Card connected, start tracking among the wallets
245245
hub.wallets[reader] = wallet
246246
events = append(events, accounts.WalletEvent{Wallet: wallet, Kind: accounts.WalletArrived})
247247
}

cmd/clef/datatypes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Example:
7575
},
7676
{
7777
"type": "Info",
78-
"message": "User should see this aswell"
78+
"message": "User should see this as well"
7979
}
8080
],
8181
"meta": {

core/blockchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
16731673
// The chain importer is starting and stopping trie prefetchers. If a bad
16741674
// block or other error is hit however, an early return may not properly
16751675
// terminate the background threads. This defer ensures that we clean up
1676-
// and dangling prefetcher, without defering each and holding on live refs.
1676+
// and dangling prefetcher, without deferring each and holding on live refs.
16771677
if activeState != nil {
16781678
activeState.StopPrefetcher()
16791679
}

core/rawdb/freezer_table_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ func getChunk(size int, b int) []byte {
894894
}
895895

896896
// TODO (?)
897-
// - test that if we remove several head-files, aswell as data last data-file,
897+
// - test that if we remove several head-files, as well as data last data-file,
898898
// the index is truncated accordingly
899899
// Right now, the freezer would fail on these conditions:
900900
// 1. have data files d0, d1, d2, d3

core/state/pruner/pruner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func prune(snaptree *snapshot.Tree, root common.Hash, maindb ethdb.Database, sta
121121
// the trie nodes(and codes) belong to the active state will be filtered
122122
// out. A very small part of stale tries will also be filtered because of
123123
// the false-positive rate of bloom filter. But the assumption is held here
124-
// that the false-positive is low enough(~0.05%). The probablity of the
124+
// that the false-positive is low enough(~0.05%). The probability of the
125125
// dangling node is the state root is super low. So the dangling nodes in
126126
// theory will never ever be visited again.
127127
var (

core/state/snapshot/difflayer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
aggregatorMemoryLimit = uint64(4 * 1024 * 1024)
4444

4545
// aggregatorItemLimit is an approximate number of items that will end up
46-
// in the agregator layer before it's flushed out to disk. A plain account
46+
// in the aggregator layer before it's flushed out to disk. A plain account
4747
// weighs around 14B (+hash), a storage slot 32B (+hash), a deleted slot
4848
// 0B (+hash). Slots are mostly set/unset in lockstep, so that average at
4949
// 16B (+hash). All in all, the average entry seems to be 15+32=47B. Use a

core/state/snapshot/disklayer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func TestDiskMerge(t *testing.T) {
139139
// Retrieve all the data through the disk layer and validate it
140140
base = snaps.Snapshot(diffRoot)
141141
if _, ok := base.(*diskLayer); !ok {
142-
t.Fatalf("update not flattend into the disk layer")
142+
t.Fatalf("update not flattened into the disk layer")
143143
}
144144

145145
// assertAccount ensures that an account matches the given blob.
@@ -362,7 +362,7 @@ func TestDiskPartialMerge(t *testing.T) {
362362
// Retrieve all the data through the disk layer and validate it
363363
base = snaps.Snapshot(diffRoot)
364364
if _, ok := base.(*diskLayer); !ok {
365-
t.Fatalf("test %d: update not flattend into the disk layer", i)
365+
t.Fatalf("test %d: update not flattened into the disk layer", i)
366366
}
367367
assertAccount(accNoModNoCache, accNoModNoCache[:])
368368
assertAccount(accNoModCache, accNoModCache[:])

core/state/sync_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func testIterativeStateSync(t *testing.T, count int, commit bool, bypath bool, s
237237
id := trie.StorageTrieID(srcRoot, common.BytesToHash(node.syncPath[0]), acc.Root)
238238
stTrie, err := trie.New(id, ndb)
239239
if err != nil {
240-
t.Fatalf("failed to retriev storage trie for path %x: %v", node.syncPath[1], err)
240+
t.Fatalf("failed to retrieve storage trie for path %x: %v", node.syncPath[1], err)
241241
}
242242
data, _, err := stTrie.GetNode(node.syncPath[1])
243243
if err != nil {

core/txpool/blobpool/blobpool.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ func (p *BlobPool) parseTransaction(id uint64, size uint32, blob []byte) error {
458458
tx := new(types.Transaction)
459459
if err := rlp.DecodeBytes(blob, tx); err != nil {
460460
// This path is impossible unless the disk data representation changes
461-
// across restarts. For that ever unprobable case, recover gracefully
461+
// across restarts. For that ever improbable case, recover gracefully
462462
// by ignoring this data entry.
463463
log.Error("Failed to decode blob pool entry", "id", id, "err", err)
464464
return err
@@ -479,7 +479,7 @@ func (p *BlobPool) parseTransaction(id uint64, size uint32, blob []byte) error {
479479
sender, err := p.signer.Sender(tx)
480480
if err != nil {
481481
// This path is impossible unless the signature validity changes across
482-
// restarts. For that ever unprobable case, recover gracefully by ignoring
482+
// restarts. For that ever improbable case, recover gracefully by ignoring
483483
// this data entry.
484484
log.Error("Failed to recover blob tx sender", "id", id, "hash", tx.Hash(), "err", err)
485485
return err
@@ -749,7 +749,7 @@ func (p *BlobPool) recheck(addr common.Address, inclusions map[common.Hash]uint6
749749
// offload removes a tracked blob transaction from the pool and moves it into the
750750
// limbo for tracking until finality.
751751
//
752-
// The method may log errors for various unexpcted scenarios but will not return
752+
// The method may log errors for various unexpected scenarios but will not return
753753
// any of it since there's no clear error case. Some errors may be due to coding
754754
// issues, others caused by signers mining MEV stuff or swapping transactions. In
755755
// all cases, the pool needs to continue operating.
@@ -1201,7 +1201,7 @@ func (p *BlobPool) Get(hash common.Hash) *types.Transaction {
12011201
}
12021202

12031203
// Add inserts a set of blob transactions into the pool if they pass validation (both
1204-
// consensus validity and pool restictions).
1204+
// consensus validity and pool restrictions).
12051205
func (p *BlobPool) Add(txs []*types.Transaction, local bool, sync bool) []error {
12061206
var (
12071207
adds = make([]*types.Transaction, 0, len(txs))
@@ -1221,7 +1221,7 @@ func (p *BlobPool) Add(txs []*types.Transaction, local bool, sync bool) []error
12211221
}
12221222

12231223
// Add inserts a new blob transaction into the pool if it passes validation (both
1224-
// consensus validity and pool restictions).
1224+
// consensus validity and pool restrictions).
12251225
func (p *BlobPool) add(tx *types.Transaction) (err error) {
12261226
// The blob pool blocks on adding a transaction. This is because blob txs are
12271227
// only even pulled form the network, so this method will act as the overload

0 commit comments

Comments
 (0)