From d8bb107f14e8684e665d34ceb77dd34a978a03f9 Mon Sep 17 00:00:00 2001 From: mountcount Date: Fri, 29 Nov 2024 18:22:04 +0800 Subject: [PATCH] chore: fix problematic const name and some typos in comment Signed-off-by: mountcount --- core/state/pruner/pruner.go | 2 +- miner/worker.go | 2 +- plugin/evm/vm_test.go | 2 +- sync/statesync/trie_sync_stats.go | 2 +- warp/aggregator/aggregator_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/state/pruner/pruner.go b/core/state/pruner/pruner.go index 96e27d28cd..c290171b06 100644 --- a/core/state/pruner/pruner.go +++ b/core/state/pruner/pruner.go @@ -52,7 +52,7 @@ const ( // stateBloomFilePrefix is the filename prefix of state bloom filter. stateBloomFilePrefix = "statebloom" - // stateBloomFilePrefix is the filename suffix of state bloom filter. + // stateBloomFileSuffix is the filename suffix of state bloom filter. stateBloomFileSuffix = "bf.gz" // stateBloomFileTempSuffix is the filename suffix of state bloom filter diff --git a/miner/worker.go b/miner/worker.go index 4fd7919553..a7c2a43665 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -430,7 +430,7 @@ func (w *worker) commitTransactions(env *environment, plainTxs, blobTxs *transac continue } // Abort transaction if it won't fit in the block and continue to search for a smaller - // transction that will fit. + // transaction that will fit. if totalTxsSize := env.size + tx.Size(); totalTxsSize > targetTxsSize { log.Trace("Skipping transaction that would exceed target size", "hash", tx.Hash(), "totalTxsSize", totalTxsSize, "txSize", tx.Size()) txs.Pop() diff --git a/plugin/evm/vm_test.go b/plugin/evm/vm_test.go index 55fde2844f..194b3ff183 100644 --- a/plugin/evm/vm_test.go +++ b/plugin/evm/vm_test.go @@ -1919,7 +1919,7 @@ func TestConfigureLogLevel(t *testing.T) { } } - // If the VM was not initialized, do not attept to shut it down + // If the VM was not initialized, do not attempt to shut it down if err == nil { shutdownChan := make(chan error, 1) shutdownFunc := func() { diff --git a/sync/statesync/trie_sync_stats.go b/sync/statesync/trie_sync_stats.go index 217c649181..490dc88cce 100644 --- a/sync/statesync/trie_sync_stats.go +++ b/sync/statesync/trie_sync_stats.go @@ -79,7 +79,7 @@ func (t *trieSyncStats) incLeafs(segment *trieSegment, count uint64, remaining u } } -// estimateSegmentsInProgressTime retrns the ETA for all trie segments +// estimateSegmentsInProgressTime returns the ETA for all trie segments // in progress to finish (uses the one with most remaining leafs to estimate). func (t *trieSyncStats) estimateSegmentsInProgressTime() time.Duration { if len(t.remainingLeafs) == 0 { diff --git a/warp/aggregator/aggregator_test.go b/warp/aggregator/aggregator_test.go index a423f75b25..1fedec6d36 100644 --- a/warp/aggregator/aggregator_test.go +++ b/warp/aggregator/aggregator_test.go @@ -230,7 +230,7 @@ func TestAggregateSignatures(t *testing.T) { expectedErr: nil, }, { - name: "early termination of signature fetching on parent context cancelation", + name: "early termination of signature fetching on parent context cancellation", contextWithCancelFunc: func() (context.Context, context.CancelFunc) { ctx, cancel := context.WithCancel(context.Background()) cancel()