From b42c28dd93eec06e80d8c6b20b54adbf5f731918 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Fri, 31 Jan 2025 03:32:27 +0800 Subject: [PATCH] fix: some typos (#1396) * build(deps): bump golang.org/x/crypto from 0.24.0 to 0.31.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.31.0. - [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] * fix: typo Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> * fix: typo Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> * fix: typo Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> * fix: typo Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raneet Debnath <35629432+Raneet10@users.noreply.github.com> --- core/blockchain.go | 2 +- core/rawdb/database.go | 2 +- core/rawdb/freezer.go | 2 +- eth/downloader/whitelist/service_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index b293f8d4ef..1fe9617870 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2393,7 +2393,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error) // Before the actual db insertion happens, verify the block against the whitelisted // milestone and checkpoint. This is to prevent a race condition where a milestone // or checkpoint was whitelisted while the block execution happened (and wasn't - // available sometime before) and the block turns out to be inavlid (i.e. not + // available sometime before) and the block turns out to be invalid (i.e. not // honouring the milestone or checkpoint). Use the block itself as current block // so that it's considered as a `past` chain and the validation doesn't get bypassed. isValid, err = bc.forker.ValidateReorg(block.Header(), []*types.Header{block.Header()}) diff --git a/core/rawdb/database.go b/core/rawdb/database.go index e4b2167fc7..b3563af59e 100644 --- a/core/rawdb/database.go +++ b/core/rawdb/database.go @@ -217,7 +217,7 @@ func WriteOffsetOfLastAncientFreezer(db ethdb.KeyValueWriter, offset uint64) { // NewDatabaseWithOnlyFreezer create a freezer db without state func NewDatabaseWithOnlyFreezer(db ethdb.KeyValueStore, frz, namespace string, readonly bool, newOffSet uint64) (*Freezer, error) { - // Create the idle freezer instance, this operation should be atomic to avoid mismatch between offset and acientDB. + // Create the idle freezer instance, this operation should be atomic to avoid mismatch between offset and ancientDB. frdb, err := NewChainFreezer(frz, namespace, readonly, newOffSet) if err != nil { return nil, err diff --git a/core/rawdb/freezer.go b/core/rawdb/freezer.go index 493bc3c618..af52af579d 100644 --- a/core/rawdb/freezer.go +++ b/core/rawdb/freezer.go @@ -152,7 +152,7 @@ func NewFreezer(datadir string, namespace string, readonly bool, offset uint64, } // Some blocks in ancientDB may have already been frozen and been pruned, so adding the offset to - // reprensent the absolute number of blocks already frozen. + // represent the absolute number of blocks already frozen. freezer.frozen.Add(offset) // Create the write batch. diff --git a/eth/downloader/whitelist/service_test.go b/eth/downloader/whitelist/service_test.go index 169996bf6a..3ca7f22950 100644 --- a/eth/downloader/whitelist/service_test.go +++ b/eth/downloader/whitelist/service_test.go @@ -559,7 +559,7 @@ func TestIsValidChain(t *testing.T) { s.ProcessMilestone(tempChain[1].Number.Uint64(), tempChain[1].Hash()) // case10: Try importing a past chain having valid checkpoint, should - // consider the chain as invalid as still lastest milestone is ahead of the chain. + // consider the chain as invalid as still latest milestone is ahead of the chain. res, err = s.IsValidChain(tempChain[1], chainA) require.Nil(t, err) require.Equal(t, res, false, "expected chain to be invalid")