From edc864f9ba186fd307d9c98c42136db6c9411cf9 Mon Sep 17 00:00:00 2001 From: alex <152680487+bodhi-crypo@users.noreply.github.com> Date: Mon, 18 Dec 2023 16:35:12 +0800 Subject: [PATCH] all: fix typos in comments (#28682) chore(core,eth):fix a couple of typos --- cmd/clef/pythonsigner.py | 2 +- core/txpool/blobpool/blobpool.go | 4 ++-- core/txpool/blobpool/blobpool_test.go | 2 +- core/txpool/blobpool/metrics.go | 2 +- core/vm/runtime/runtime_test.go | 2 +- eth/downloader/downloader.go | 2 +- eth/downloader/resultstore.go | 2 +- ethclient/gethclient/gethclient_test.go | 2 +- p2p/rlpx/rlpx_test.go | 2 +- p2p/simulations/network_test.go | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/clef/pythonsigner.py b/cmd/clef/pythonsigner.py index b9ea1e406..5d0eb18dc 100644 --- a/cmd/clef/pythonsigner.py +++ b/cmd/clef/pythonsigner.py @@ -91,7 +91,7 @@ class StdIOHandler: {"jsonrpc":"2.0","id":20,"method":"ui_approveTx","params":[{"transaction":{"from":"0xDEADbEeF000000000000000000000000DeaDbeEf","to":"0xDEADbEeF000000000000000000000000DeaDbeEf","gas":"0x3e8","gasPrice":"0x5","maxFeePerGas":null,"maxPriorityFeePerGas":null,"value":"0x6","nonce":"0x1","data":"0x"},"call_info":null,"meta":{"remote":"clef binary","local":"main","scheme":"in-proc","User-Agent":"","Origin":""}}]} :param transaction: transaction info - :param call_info: info abou the call, e.g. if ABI info could not be + :param call_info: info about the call, e.g. if ABI info could not be :param meta: metadata about the request, e.g. where the call comes from :return: """ # noqa: E501 diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 32c6c0e8f..195697a8f 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -738,7 +738,7 @@ func (p *BlobPool) offload(addr common.Address, nonce uint64, id uint64, inclusi } // Reset implements txpool.SubPool, allowing the blob pool's internal state to be -// kept in sync with the main transacion pool's internal state. +// kept in sync with the main transaction pool's internal state. func (p *BlobPool) Reset(oldHead, newHead *types.Header) { waitStart := time.Now() p.lock.Lock() @@ -972,7 +972,7 @@ func (p *BlobPool) reinject(addr common.Address, txhash common.Hash) error { } // SetGasTip implements txpool.SubPool, allowing the blob pool's gas requirements -// to be kept in sync with the main transacion pool's gas requirements. +// to be kept in sync with the main transaction pool's gas requirements. func (p *BlobPool) SetGasTip(tip *big.Int) { p.lock.Lock() defer p.lock.Unlock() diff --git a/core/txpool/blobpool/blobpool_test.go b/core/txpool/blobpool/blobpool_test.go index fa3e8edc9..b709ad0e5 100644 --- a/core/txpool/blobpool/blobpool_test.go +++ b/core/txpool/blobpool/blobpool_test.go @@ -594,7 +594,7 @@ func TestOpenDrops(t *testing.T) { verifyPoolInternals(t, pool) } -// Tests that transactions loaded from disk are indexed corrently. +// Tests that transactions loaded from disk are indexed correctly. // // - 1. Transactions must be groupped by sender, sorted by nonce // - 2. Eviction thresholds are calculated correctly for the sequences diff --git a/core/txpool/blobpool/metrics.go b/core/txpool/blobpool/metrics.go index 070cc5ca4..587804cc6 100644 --- a/core/txpool/blobpool/metrics.go +++ b/core/txpool/blobpool/metrics.go @@ -65,7 +65,7 @@ var ( pooltipGauge = metrics.NewRegisteredGauge("blobpool/pooltip", nil) // addwait/time, resetwait/time and getwait/time track the rough health of - // the pool and wether or not it's capable of keeping up with the load from + // the pool and whether or not it's capable of keeping up with the load from // the network. addwaitHist = metrics.NewRegisteredHistogram("blobpool/addwait", nil, metrics.NewExpDecaySample(1028, 0.015)) addtimeHist = metrics.NewRegisteredHistogram("blobpool/addtime", nil, metrics.NewExpDecaySample(1028, 0.015)) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 796d3b443..e71760bb2 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -671,7 +671,7 @@ func TestColdAccountAccessCost(t *testing.T) { for ii, op := range tracer.StructLogs() { t.Logf("%d: %v %d", ii, op.OpName(), op.GasCost) } - t.Fatalf("tescase %d, gas report wrong, step %d, have %d want %d", i, tc.step, have, want) + t.Fatalf("testcase %d, gas report wrong, step %d, have %d want %d", i, tc.step, have, want) } } } diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 2ca7e328c..f1cfa92d5 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -576,7 +576,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td, ttd * // For non-merged networks, if there is a checkpoint available, then calculate // the ancientLimit through that. Otherwise calculate the ancient limit through // the advertised height of the remote peer. This most is mostly a fallback for - // legacy networks, but should eventually be droppped. TODO(karalabe). + // legacy networks, but should eventually be dropped. TODO(karalabe). if beaconMode { // Beacon sync, use the latest finalized block as the ancient limit // or a reasonable height if no finalized block is yet announced. diff --git a/eth/downloader/resultstore.go b/eth/downloader/resultstore.go index 7f7f5a89e..e4323c04e 100644 --- a/eth/downloader/resultstore.go +++ b/eth/downloader/resultstore.go @@ -142,7 +142,7 @@ func (r *resultStore) HasCompletedItems() bool { // countCompleted returns the number of items ready for delivery, stopping at // the first non-complete item. // -// The mthod assumes (at least) rlock is held. +// The method assumes (at least) rlock is held. func (r *resultStore) countCompleted() int { // We iterate from the already known complete point, and see // if any more has completed since last count diff --git a/ethclient/gethclient/gethclient_test.go b/ethclient/gethclient/gethclient_test.go index a718246bd..fdd94a7d7 100644 --- a/ethclient/gethclient/gethclient_test.go +++ b/ethclient/gethclient/gethclient_test.go @@ -450,7 +450,7 @@ func testCallContract(t *testing.T, client *rpc.Client) { func TestOverrideAccountMarshal(t *testing.T) { om := map[common.Address]OverrideAccount{ {0x11}: { - // Zero-valued nonce is not overriddden, but simply dropped by the encoder. + // Zero-valued nonce is not overridden, but simply dropped by the encoder. Nonce: 0, }, {0xaa}: { diff --git a/p2p/rlpx/rlpx_test.go b/p2p/rlpx/rlpx_test.go index 28759f2b4..136cb1b5b 100644 --- a/p2p/rlpx/rlpx_test.go +++ b/p2p/rlpx/rlpx_test.go @@ -421,7 +421,7 @@ func BenchmarkThroughput(b *testing.B) { } conn2.SetSnappy(true) if err := <-handshakeDone; err != nil { - b.Fatal("server hanshake error:", err) + b.Fatal("server handshake error:", err) } // Read N messages. diff --git a/p2p/simulations/network_test.go b/p2p/simulations/network_test.go index ab8cf1946..4ed1e4e6c 100644 --- a/p2p/simulations/network_test.go +++ b/p2p/simulations/network_test.go @@ -683,7 +683,7 @@ func triggerChecks(ctx context.Context, ids []enode.ID, trigger chan enode.ID, i } } -// \todo: refactor to implement shapshots +// \todo: refactor to implement snapshots // and connect configuration methods once these are moved from // swarm/network/simulations/connect.go func BenchmarkMinimalService(b *testing.B) {