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] <support@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>

* fix: typo

Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
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>
This commit is contained in:
chloefeal 2025-01-31 03:32:27 +08:00 committed by GitHub
parent 73e7a84851
commit b42c28dd93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -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 // 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 // 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 // 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 // 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. // 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()}) isValid, err = bc.forker.ValidateReorg(block.Header(), []*types.Header{block.Header()})

View file

@ -217,7 +217,7 @@ func WriteOffsetOfLastAncientFreezer(db ethdb.KeyValueWriter, offset uint64) {
// NewDatabaseWithOnlyFreezer create a freezer db without state // NewDatabaseWithOnlyFreezer create a freezer db without state
func NewDatabaseWithOnlyFreezer(db ethdb.KeyValueStore, frz, namespace string, readonly bool, newOffSet uint64) (*Freezer, error) { 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) frdb, err := NewChainFreezer(frz, namespace, readonly, newOffSet)
if err != nil { if err != nil {
return nil, err return nil, err

View file

@ -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 // 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) freezer.frozen.Add(offset)
// Create the write batch. // Create the write batch.

View file

@ -559,7 +559,7 @@ func TestIsValidChain(t *testing.T) {
s.ProcessMilestone(tempChain[1].Number.Uint64(), tempChain[1].Hash()) s.ProcessMilestone(tempChain[1].Number.Uint64(), tempChain[1].Hash())
// case10: Try importing a past chain having valid checkpoint, should // 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) res, err = s.IsValidChain(tempChain[1], chainA)
require.Nil(t, err) require.Nil(t, err)
require.Equal(t, res, false, "expected chain to be invalid") require.Equal(t, res, false, "expected chain to be invalid")