From 5e566e84d422ace5c88948df0cfbb732badc5dbc Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "core/blockchain: fix typos and grammar (#28295)" This reverts commit 7ae1f808cc11b201719b73a194a0de4a28cc6fee. --- core/blockchain.go | 7 ++++--- core/blockchain_test.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index f458da8257..fc5c249ce2 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -344,7 +344,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis if head.Number.Uint64() == 0 { // The genesis state is missing, which is only possible in the path-based // scheme. This situation occurs when the initial state sync is not finished - // yet, or the chain head is rewound below the pivot point. In both scenarios, + // yet, or the chain head is rewound below the pivot point. In both scenario, // there is no possible recovery approach except for rerunning a snap sync. // Do nothing here until the state syncer picks it up. log.Info("Genesis state is missing, wait state sync") @@ -666,8 +666,9 @@ func (bc *BlockChain) setHeadBeyondRoot(head uint64, time uint64, root common.Ha log.Error("Gap in the chain, rewinding to genesis", "number", header.Number, "hash", header.Hash()) newHeadBlock = bc.genesisBlock } else { - // Block exists. Keep rewinding until either we find one with state - // or until we exceed the optional threshold root hash + // Block exists, keep rewinding until we find one with state, + // keeping rewinding until we exceed the optional threshold + // root hash beyondRoot := (root == common.Hash{}) // Flag whether we're beyond the requested root (no root, always true) for { diff --git a/core/blockchain_test.go b/core/blockchain_test.go index bc6f8112f0..992f8d168f 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -49,7 +49,7 @@ var ( ) // newCanonical creates a chain database, and injects a deterministic canonical -// chain. Depending on the full flag, it creates either a full block chain or a +// chain. Depending on the full flag, if creates either a full block chain or a // header only chain. The database and genesis specification for block generation // are also returned in case more test blocks are needed later. func newCanonical(engine consensus.Engine, n int, full bool, scheme string) (ethdb.Database, *Genesis, *BlockChain, error) {