Skip to content

Commit 2c5648d

Browse files
authored
all: fix some typos (#25551)
* Fix some typos * Fix some mistakes * Revert 4byte.json * Fix an incorrect fix * Change files to fails
1 parent a1b8892 commit 2c5648d

File tree

94 files changed

+200
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+200
-200
lines changed

accounts/abi/reflect_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type reflectTest struct {
3232

3333
var reflectTests = []reflectTest{
3434
{
35-
name: "OneToOneCorrespondance",
35+
name: "OneToOneCorrespondence",
3636
args: []string{"fieldA"},
3737
struc: struct {
3838
FieldA int `abi:"fieldA"`

accounts/keystore/account_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func waitForAccounts(wantAccounts []accounts.Account, ks *KeyStore) error {
318318
func TestUpdatedKeyfileContents(t *testing.T) {
319319
t.Parallel()
320320

321-
// Create a temporary kesytore to test with
321+
// Create a temporary keystore to test with
322322
rand.Seed(time.Now().UnixNano())
323323
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
324324
ks := NewKeyStore(dir, LightScryptN, LightScryptP)

accounts/keystore/file_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type fileCache struct {
3939
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
4040
t0 := time.Now()
4141

42-
// List all the failes from the keystore folder
42+
// List all the files from the keystore folder
4343
files, err := os.ReadDir(keyDir)
4444
if err != nil {
4545
return nil, nil, nil, err
@@ -61,7 +61,7 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er
6161
log.Trace("Ignoring file on account scan", "path", path)
6262
continue
6363
}
64-
// Gather the set of all and fresly modified files
64+
// Gather the set of all and freshly modified files
6565
all.Add(path)
6666

6767
info, err := fi.Info()

accounts/keystore/keystore_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func TestSignRace(t *testing.T) {
214214
// Tests that the wallet notifier loop starts and stops correctly based on the
215215
// addition and removal of wallet event subscriptions.
216216
func TestWalletNotifierLifecycle(t *testing.T) {
217-
// Create a temporary kesytore to test with
217+
// Create a temporary keystore to test with
218218
_, ks := tmpKeyStore(t, false)
219219

220220
// Ensure that the notification updater is not running yet

accounts/usbwallet/trezor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, er
196196
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
197197
return common.Address{}, err
198198
}
199-
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary fomats
199+
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary formats
200200
return common.BytesToAddress(addr), nil
201201
}
202-
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal fomats
202+
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal formats
203203
return common.HexToAddress(addr), nil
204204
}
205205
return common.Address{}, errors.New("missing derived address")

accounts/usbwallet/wallet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ func (w *wallet) selfDerive() {
380380
// of legacy-ledger, the first account on the legacy-path will
381381
// be shown to the user, even if we don't actively track it
382382
if i < len(nextAddrs)-1 {
383-
w.log.Info("Skipping trakcking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
383+
w.log.Info("Skipping tracking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
384384
"path", path, "address", nextAddrs[i])
385385
break
386386
}

build/ci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ func doDocker(cmdline []string) {
608608
}
609609
if mismatch {
610610
// Build numbers mismatching, retry in a short time to
611-
// avoid concurrent failes in both publisher images. If
611+
// avoid concurrent fails in both publisher images. If
612612
// however the retry failed too, it means the concurrent
613613
// builder is still crunching, let that do the publish.
614614
if i == 0 {

cmd/faucet/faucet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ func authTwitter(url string, tokenV1, tokenV2 string) (string, string, string, c
709709
case tokenV2 != "":
710710
return authTwitterWithTokenV2(tweetID, tokenV2)
711711
}
712-
// Twiter API token isn't provided so we just load the public posts
712+
// Twitter API token isn't provided so we just load the public posts
713713
// and scrape it for the Ethereum address and profile URL. We need to load
714714
// the mobile page though since the main page loads tweet contents via JS.
715715
url = strings.Replace(url, "https://twitter.com/", "https://mobile.twitter.com/", 1)

cmd/geth/consolecmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ To exit, press ctrl-d or type exit
155155
}
156156

157157
// trulyRandInt generates a crypto random integer used by the console tests to
158-
// not clash network ports with other tests running cocurrently.
158+
// not clash network ports with other tests running concurrently.
159159
func trulyRandInt(lo, hi int) int {
160160
num, _ := rand.Int(rand.Reader, big.NewInt(int64(hi-lo)))
161161
return int(num.Int64()) + lo

cmd/puppeth/ssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func dial(server string, pubkey []byte) (*sshClient, error) {
163163
return nil
164164
}
165165
// We have a mismatch, forbid connecting
166-
return errors.New("ssh key mismatch, readd the machine to update")
166+
return errors.New("ssh key mismatch, re-add the machine to update")
167167
}
168168
client, err := ssh.Dial("tcp", hostport, &ssh.ClientConfig{User: username, Auth: auths, HostKeyCallback: keycheck})
169169
if err != nil {

common/prque/prque.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ func (p *Prque) Push(data interface{}, priority int64) {
4141
heap.Push(p.cont, &item{data, priority})
4242
}
4343

44-
// Peek returns the value with the greates priority but does not pop it off.
44+
// Peek returns the value with the greatest priority but does not pop it off.
4545
func (p *Prque) Peek() (interface{}, int64) {
4646
item := p.cont.blocks[0][0]
4747
return item.value, item.priority
4848
}
4949

50-
// Pops the value with the greates priority off the stack and returns it.
50+
// Pops the value with the greatest priority off the stack and returns it.
5151
// Currently no shrinking is done.
5252
func (p *Prque) Pop() (interface{}, int64) {
5353
item := heap.Pop(p.cont).(*item)

consensus/clique/snapshot_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func TestClique(t *testing.T) {
305305
}, {
306306
// Ensure that pending votes don't survive authorization status changes. This
307307
// corner case can only appear if a signer is quickly added, removed and then
308-
// readded (or the inverse), while one of the original voters dropped. If a
308+
// re-added (or the inverse), while one of the original voters dropped. If a
309309
// past vote is left cached in the system somewhere, this will interfere with
310310
// the final signer outcome.
311311
signers: []string{"A", "B", "C", "D", "E"},
@@ -344,7 +344,7 @@ func TestClique(t *testing.T) {
344344
},
345345
failure: errUnauthorizedSigner,
346346
}, {
347-
// An authorized signer that signed recenty should not be able to sign again
347+
// An authorized signer that signed recently should not be able to sign again
348348
signers: []string{"A", "B"},
349349
votes: []testerVote{
350350
{signer: "A"},

console/console.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (c *Console) AutoCompleteInput(line string, pos int) (string, []string, str
290290
if len(line) == 0 || pos == 0 {
291291
return "", nil, ""
292292
}
293-
// Chunck data to relevant part for autocompletion
293+
// Chunk data to relevant part for autocompletion
294294
// E.g. in case of nested lines eth.getBalance(eth.coinb<tab><tab>
295295
start := pos - 1
296296
for ; start > 0; start-- {
@@ -407,7 +407,7 @@ func (c *Console) StopInteractive() {
407407
}
408408
}
409409

410-
// Interactive starts an interactive user session, where in.put is propted from
410+
// Interactive starts an interactive user session, where input is prompted from
411411
// the configured user prompter.
412412
func (c *Console) Interactive() {
413413
var (
@@ -497,7 +497,7 @@ func (c *Console) readLines(input chan<- string, errc chan<- error, prompt <-cha
497497
}
498498
}
499499

500-
// countIndents returns the number of identations for the given input.
500+
// countIndents returns the number of indentations for the given input.
501501
// In case of invalid input such as var a = } the result can be negative.
502502
func countIndents(input string) int {
503503
var (

core/blockchain.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types
13751375
}
13761376
// In theory we should fire a ChainHeadEvent when we inject
13771377
// a canonical block, but sometimes we can insert a batch of
1378-
// canonicial blocks. Avoid firing too many ChainHeadEvents,
1378+
// canonical blocks. Avoid firing too many ChainHeadEvents,
13791379
// we will fire an accumulated ChainHeadEvent and disable fire
13801380
// event here.
13811381
if emitHeadEvent {
@@ -1612,7 +1612,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool)
16121612
// block in the middle. It can only happen in the clique chain. Whenever
16131613
// we insert blocks via `insertSideChain`, we only commit `td`, `header`
16141614
// and `body` if it's non-existent. Since we don't have receipts without
1615-
// reexecution, so nothing to commit. But if the sidechain will be adpoted
1615+
// reexecution, so nothing to commit. But if the sidechain will be adopted
16161616
// as the canonical chain eventually, it needs to be reexecuted for missing
16171617
// state, but if it's this special case here(skip reexecution) we will lose
16181618
// the empty receipt entry.

core/blockchain_repair_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ func testShortReorgedSnapSyncingRepair(t *testing.T, snapshots bool) {
564564
// Tests a recovery for a long canonical chain with frozen blocks where a recent
565565
// block - newer than the ancient limit - was already committed to disk and then
566566
// the process crashed. In this case we expect the chain to be rolled back to the
567-
// committed block, with everything afterwads kept as fast sync data.
567+
// committed block, with everything afterwards kept as fast sync data.
568568
func TestLongShallowRepair(t *testing.T) { testLongShallowRepair(t, false) }
569569
func TestLongShallowRepairWithSnapshots(t *testing.T) { testLongShallowRepair(t, true) }
570570

@@ -609,7 +609,7 @@ func testLongShallowRepair(t *testing.T, snapshots bool) {
609609
// Tests a recovery for a long canonical chain with frozen blocks where a recent
610610
// block - older than the ancient limit - was already committed to disk and then
611611
// the process crashed. In this case we expect the chain to be rolled back to the
612-
// committed block, with everything afterwads deleted.
612+
// committed block, with everything afterwards deleted.
613613
func TestLongDeepRepair(t *testing.T) { testLongDeepRepair(t, false) }
614614
func TestLongDeepRepairWithSnapshots(t *testing.T) { testLongDeepRepair(t, true) }
615615

@@ -653,7 +653,7 @@ func testLongDeepRepair(t *testing.T, snapshots bool) {
653653
// Tests a recovery for a long canonical chain with frozen blocks where the fast
654654
// sync pivot point - newer than the ancient limit - was already committed, after
655655
// which the process crashed. In this case we expect the chain to be rolled back
656-
// to the committed block, with everything afterwads kept as fast sync data.
656+
// to the committed block, with everything afterwards kept as fast sync data.
657657
func TestLongSnapSyncedShallowRepair(t *testing.T) {
658658
testLongSnapSyncedShallowRepair(t, false)
659659
}
@@ -702,7 +702,7 @@ func testLongSnapSyncedShallowRepair(t *testing.T, snapshots bool) {
702702
// Tests a recovery for a long canonical chain with frozen blocks where the fast
703703
// sync pivot point - older than the ancient limit - was already committed, after
704704
// which the process crashed. In this case we expect the chain to be rolled back
705-
// to the committed block, with everything afterwads deleted.
705+
// to the committed block, with everything afterwards deleted.
706706
func TestLongSnapSyncedDeepRepair(t *testing.T) { testLongSnapSyncedDeepRepair(t, false) }
707707
func TestLongSnapSyncedDeepRepairWithSnapshots(t *testing.T) { testLongSnapSyncedDeepRepair(t, true) }
708708

@@ -843,7 +843,7 @@ func testLongSnapSyncingDeepRepair(t *testing.T, snapshots bool) {
843843
// side chain, where a recent block - newer than the ancient limit - was already
844844
// committed to disk and then the process crashed. In this test scenario the side
845845
// chain is below the committed block. In this case we expect the chain to be
846-
// rolled back to the committed block, with everything afterwads kept as fast
846+
// rolled back to the committed block, with everything afterwards kept as fast
847847
// sync data; the side chain completely nuked by the freezer.
848848
func TestLongOldForkedShallowRepair(t *testing.T) {
849849
testLongOldForkedShallowRepair(t, false)
@@ -895,7 +895,7 @@ func testLongOldForkedShallowRepair(t *testing.T, snapshots bool) {
895895
// side chain, where a recent block - older than the ancient limit - was already
896896
// committed to disk and then the process crashed. In this test scenario the side
897897
// chain is below the committed block. In this case we expect the canonical chain
898-
// to be rolled back to the committed block, with everything afterwads deleted;
898+
// to be rolled back to the committed block, with everything afterwards deleted;
899899
// the side chain completely nuked by the freezer.
900900
func TestLongOldForkedDeepRepair(t *testing.T) { testLongOldForkedDeepRepair(t, false) }
901901
func TestLongOldForkedDeepRepairWithSnapshots(t *testing.T) { testLongOldForkedDeepRepair(t, true) }
@@ -942,7 +942,7 @@ func testLongOldForkedDeepRepair(t *testing.T, snapshots bool) {
942942
// side chain, where the fast sync pivot point - newer than the ancient limit -
943943
// was already committed to disk and then the process crashed. In this test scenario
944944
// the side chain is below the committed block. In this case we expect the chain
945-
// to be rolled back to the committed block, with everything afterwads kept as
945+
// to be rolled back to the committed block, with everything afterwards kept as
946946
// fast sync data; the side chain completely nuked by the freezer.
947947
func TestLongOldForkedSnapSyncedShallowRepair(t *testing.T) {
948948
testLongOldForkedSnapSyncedShallowRepair(t, false)
@@ -994,7 +994,7 @@ func testLongOldForkedSnapSyncedShallowRepair(t *testing.T, snapshots bool) {
994994
// side chain, where the fast sync pivot point - older than the ancient limit -
995995
// was already committed to disk and then the process crashed. In this test scenario
996996
// the side chain is below the committed block. In this case we expect the canonical
997-
// chain to be rolled back to the committed block, with everything afterwads deleted;
997+
// chain to be rolled back to the committed block, with everything afterwards deleted;
998998
// the side chain completely nuked by the freezer.
999999
func TestLongOldForkedSnapSyncedDeepRepair(t *testing.T) {
10001000
testLongOldForkedSnapSyncedDeepRepair(t, false)
@@ -1149,7 +1149,7 @@ func testLongOldForkedSnapSyncingDeepRepair(t *testing.T, snapshots bool) {
11491149
// side chain, where a recent block - newer than the ancient limit - was already
11501150
// committed to disk and then the process crashed. In this test scenario the side
11511151
// chain is above the committed block. In this case we expect the chain to be
1152-
// rolled back to the committed block, with everything afterwads kept as fast
1152+
// rolled back to the committed block, with everything afterwards kept as fast
11531153
// sync data; the side chain completely nuked by the freezer.
11541154
func TestLongNewerForkedShallowRepair(t *testing.T) {
11551155
testLongNewerForkedShallowRepair(t, false)
@@ -1201,7 +1201,7 @@ func testLongNewerForkedShallowRepair(t *testing.T, snapshots bool) {
12011201
// side chain, where a recent block - older than the ancient limit - was already
12021202
// committed to disk and then the process crashed. In this test scenario the side
12031203
// chain is above the committed block. In this case we expect the canonical chain
1204-
// to be rolled back to the committed block, with everything afterwads deleted;
1204+
// to be rolled back to the committed block, with everything afterwards deleted;
12051205
// the side chain completely nuked by the freezer.
12061206
func TestLongNewerForkedDeepRepair(t *testing.T) { testLongNewerForkedDeepRepair(t, false) }
12071207
func TestLongNewerForkedDeepRepairWithSnapshots(t *testing.T) { testLongNewerForkedDeepRepair(t, true) }
@@ -1248,7 +1248,7 @@ func testLongNewerForkedDeepRepair(t *testing.T, snapshots bool) {
12481248
// side chain, where the fast sync pivot point - newer than the ancient limit -
12491249
// was already committed to disk and then the process crashed. In this test scenario
12501250
// the side chain is above the committed block. In this case we expect the chain
1251-
// to be rolled back to the committed block, with everything afterwads kept as fast
1251+
// to be rolled back to the committed block, with everything afterwards kept as fast
12521252
// sync data; the side chain completely nuked by the freezer.
12531253
func TestLongNewerForkedSnapSyncedShallowRepair(t *testing.T) {
12541254
testLongNewerForkedSnapSyncedShallowRepair(t, false)
@@ -1300,7 +1300,7 @@ func testLongNewerForkedSnapSyncedShallowRepair(t *testing.T, snapshots bool) {
13001300
// side chain, where the fast sync pivot point - older than the ancient limit -
13011301
// was already committed to disk and then the process crashed. In this test scenario
13021302
// the side chain is above the committed block. In this case we expect the canonical
1303-
// chain to be rolled back to the committed block, with everything afterwads deleted;
1303+
// chain to be rolled back to the committed block, with everything afterwards deleted;
13041304
// the side chain completely nuked by the freezer.
13051305
func TestLongNewerForkedSnapSyncedDeepRepair(t *testing.T) {
13061306
testLongNewerForkedSnapSyncedDeepRepair(t, false)
@@ -1454,7 +1454,7 @@ func testLongNewerForkedSnapSyncingDeepRepair(t *testing.T, snapshots bool) {
14541454
// Tests a recovery for a long canonical chain with frozen blocks and a longer side
14551455
// chain, where a recent block - newer than the ancient limit - was already committed
14561456
// to disk and then the process crashed. In this case we expect the chain to be
1457-
// rolled back to the committed block, with everything afterwads kept as fast sync
1457+
// rolled back to the committed block, with everything afterwards kept as fast sync
14581458
// data. The side chain completely nuked by the freezer.
14591459
func TestLongReorgedShallowRepair(t *testing.T) { testLongReorgedShallowRepair(t, false) }
14601460
func TestLongReorgedShallowRepairWithSnapshots(t *testing.T) { testLongReorgedShallowRepair(t, true) }
@@ -1501,7 +1501,7 @@ func testLongReorgedShallowRepair(t *testing.T, snapshots bool) {
15011501
// Tests a recovery for a long canonical chain with frozen blocks and a longer side
15021502
// chain, where a recent block - older than the ancient limit - was already committed
15031503
// to disk and then the process crashed. In this case we expect the canonical chains
1504-
// to be rolled back to the committed block, with everything afterwads deleted. The
1504+
// to be rolled back to the committed block, with everything afterwards deleted. The
15051505
// side chain completely nuked by the freezer.
15061506
func TestLongReorgedDeepRepair(t *testing.T) { testLongReorgedDeepRepair(t, false) }
15071507
func TestLongReorgedDeepRepairWithSnapshots(t *testing.T) { testLongReorgedDeepRepair(t, true) }
@@ -1548,7 +1548,7 @@ func testLongReorgedDeepRepair(t *testing.T, snapshots bool) {
15481548
// side chain, where the fast sync pivot point - newer than the ancient limit -
15491549
// was already committed to disk and then the process crashed. In this case we
15501550
// expect the chain to be rolled back to the committed block, with everything
1551-
// afterwads kept as fast sync data. The side chain completely nuked by the
1551+
// afterwards kept as fast sync data. The side chain completely nuked by the
15521552
// freezer.
15531553
func TestLongReorgedSnapSyncedShallowRepair(t *testing.T) {
15541554
testLongReorgedSnapSyncedShallowRepair(t, false)
@@ -1600,7 +1600,7 @@ func testLongReorgedSnapSyncedShallowRepair(t *testing.T, snapshots bool) {
16001600
// side chain, where the fast sync pivot point - older than the ancient limit -
16011601
// was already committed to disk and then the process crashed. In this case we
16021602
// expect the canonical chains to be rolled back to the committed block, with
1603-
// everything afterwads deleted. The side chain completely nuked by the freezer.
1603+
// everything afterwards deleted. The side chain completely nuked by the freezer.
16041604
func TestLongReorgedSnapSyncedDeepRepair(t *testing.T) {
16051605
testLongReorgedSnapSyncedDeepRepair(t, false)
16061606
}

core/rawdb/accessors_chain_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func TestTdStorage(t *testing.T) {
285285
func TestCanonicalMappingStorage(t *testing.T) {
286286
db := NewMemoryDatabase()
287287

288-
// Create a test canonical number and assinged hash to move around
288+
// Create a test canonical number and assigned hash to move around
289289
hash, number := common.Hash{0: 0xff}, uint64(314)
290290
if entry := ReadCanonicalHash(db, number); entry != (common.Hash{}) {
291291
t.Fatalf("Non existent canonical mapping returned: %v", entry)

0 commit comments

Comments
 (0)