consensus/beacon, core/blockchain: fix typo and grammar

This commit is contained in:
Hyunchel Kim 2023-10-09 07:39:34 -04:00
parent 4e1e37323d
commit 420253cc77
No known key found for this signature in database
GPG key ID: 0436BF9838B5CCC5
2 changed files with 3 additions and 4 deletions

View file

@ -216,15 +216,14 @@ func (beacon *Beacon) VerifyUncles(chain consensus.ChainReader, block *types.Blo
} }
// verifyHeader checks whether a header conforms to the consensus rules of the // verifyHeader checks whether a header conforms to the consensus rules of the
// stock Ethereum consensus engine. The difference between the beacon and classic is // stock Ethereum consensus engine. The differences between the beacon and classic are
// (a) The following fields are expected to be constants: // (a) The following fields are expected to be constants:
// - difficulty is expected to be 0 // - difficulty is expected to be 0
// - nonce is expected to be 0 // - nonce is expected to be 0
// - unclehash is expected to be Hash(emptyHeader) // - unclehash is expected to be Hash(emptyHeader)
// to be the desired constants
// //
// (b) we don't verify if a block is in the future anymore // (b) we don't verify if a block is in the future anymore
// (c) the extradata is limited to 32 bytes // (c) the extra-data is limited to 32 bytes
func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, parent *types.Header) error { func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, parent *types.Header) error {
// Ensure that the header's extra-data section is of a reasonable size // Ensure that the header's extra-data section is of a reasonable size
if len(header.Extra) > 32 { if len(header.Extra) > 32 {

View file

@ -406,7 +406,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
} }
} }
} }
// The first thing the node will do is reconstruct the verification data for // The first thing the node will do is to reconstruct the verification data for
// the head block (ethash cache or clique voting snapshot). Might as well do // the head block (ethash cache or clique voting snapshot). Might as well do
// it in advance. // it in advance.
bc.engine.VerifyHeader(bc, bc.CurrentHeader()) bc.engine.VerifyHeader(bc, bc.CurrentHeader())