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")