@@ -29,7 +29,7 @@ import (
2929 "github.com/ethereum/go-ethereum/consensus/istanbul"
3030 istanbulCore "github.com/ethereum/go-ethereum/consensus/istanbul/core"
3131 "github.com/ethereum/go-ethereum/consensus/istanbul/validator"
32- qibftCore "github.com/ethereum/go-ethereum/consensus/qibft /core"
32+ qbftCore "github.com/ethereum/go-ethereum/consensus/qbft /core"
3333 "github.com/ethereum/go-ethereum/core/state"
3434 "github.com/ethereum/go-ethereum/core/types"
3535 "github.com/ethereum/go-ethereum/log"
@@ -102,7 +102,7 @@ var (
102102// block, which may be different from the header's coinbase if a consensus
103103// engine is based on signatures.
104104func (sb * backend ) Author (header * types.Header ) (common.Address , error ) {
105- if sb .IsQIBFTConsensus () {
105+ if sb .IsQBFTConsensus () {
106106 return ecrecoverFromCoinbase (header )
107107 }
108108 return ecrecoverFromSignedHeader (header )
@@ -120,7 +120,7 @@ func (sb *backend) Signers(header *types.Header, isQbft bool) ([]common.Address,
120120 return []common.Address {}, err
121121 }
122122 committedSeal = extra .CommittedSeal
123- proposalSeal = qibftCore .PrepareCommittedSeal (header , extra .Round )
123+ proposalSeal = qbftCore .PrepareCommittedSeal (header , extra .Round )
124124 } else {
125125 extra , err := types .ExtractIstanbulExtra (header )
126126 if err != nil {
@@ -178,7 +178,7 @@ func (sb *backend) verifyHeader(chain consensus.ChainHeaderReader, header *types
178178 }
179179
180180 // Ensure that the extra data format is satisfied
181- if sb .IsQIBFTConsensus () {
181+ if sb .IsQBFTConsensus () {
182182 if _ , err := types .ExtractQbftExtra (header ); err != nil {
183183 return errInvalidExtraDataFormat
184184 }
@@ -328,7 +328,7 @@ func (sb *backend) verifyCommittedSeals(chain consensus.ChainHeaderReader, heade
328328 }
329329
330330 var committedSeal [][]byte
331- if sb .IsQIBFTConsensus () {
331+ if sb .IsQBFTConsensus () {
332332 extra , err := types .ExtractQbftExtra (header )
333333 if err != nil {
334334 return err
@@ -350,7 +350,7 @@ func (sb *backend) verifyCommittedSeals(chain consensus.ChainHeaderReader, heade
350350 validators := snap .ValSet .Copy ()
351351 // Check whether the committed seals are generated by parent's validators
352352 validSeal := 0
353- committers , err := sb .Signers (header , sb .IsQIBFTConsensus ())
353+ committers , err := sb .Signers (header , sb .IsQBFTConsensus ())
354354 if err != nil {
355355 return err
356356 }
@@ -389,8 +389,8 @@ func (sb *backend) VerifySeal(chain consensus.ChainHeaderReader, header *types.H
389389// Prepare initializes the consensus fields of a block header according to the
390390// rules of a particular engine. The changes are executed inline.
391391func (sb * backend ) Prepare (chain consensus.ChainHeaderReader , header * types.Header ) error {
392- // Check if QiBFT Consensus is used, call the QbftPrepare() is that is the case
393- if sb .IsQIBFTConsensus () {
392+ // Check if QBFT Consensus is used, call the QbftPrepare() is that is the case
393+ if sb .IsQBFTConsensus () {
394394 return sb .QbftPrepare (chain , header )
395395 }
396396 // unused fields, force to set to empty
@@ -606,7 +606,7 @@ func (sb *backend) Seal(chain consensus.ChainHeaderReader, block *types.Block, r
606606// update timestamp and signature of the block based on its number of transactions
607607func (sb * backend ) updateBlock (parent * types.Header , block * types.Block ) (* types.Block , error ) {
608608 header := block .Header ()
609- if sb .IsQIBFTConsensus () {
609+ if sb .IsQBFTConsensus () {
610610 header .Coinbase = sb .address
611611 } else {
612612 // sign the hash
@@ -653,9 +653,9 @@ func (sb *backend) Start(chain consensus.ChainHeaderReader, currentBlock func()
653653 sb .currentBlock = currentBlock
654654 sb .hasBadBlock = hasBadBlock
655655
656- // Check if qibft Consensus needs to be used after chain is set
657- if sb .IsQIBFTConsensus () {
658- sb .core = qibftCore .New (sb , sb .config )
656+ // Check if qbft Consensus needs to be used after chain is set
657+ if sb .IsQBFTConsensus () {
658+ sb .core = qbftCore .New (sb , sb .config )
659659 sb .logger .Trace ("Setting ProposerPolicy sorter to ValidatorSortByByteFunc and sort" )
660660 sb .config .ProposerPolicy .Use (istanbul .ValidatorSortByByteFunc )
661661 } else {
@@ -668,9 +668,9 @@ func (sb *backend) Start(chain consensus.ChainHeaderReader, currentBlock func()
668668
669669 sb .coreStarted = true
670670
671- if sb .IsQIBFTConsensus () {
672- sb .logger .Trace ("Started qibft consensus" )
673- sb .qibftConsensusEnabled = true
671+ if sb .IsQBFTConsensus () {
672+ sb .logger .Trace ("Started qbft consensus" )
673+ sb .qbftConsensusEnabled = true
674674 }
675675
676676 return nil
@@ -688,8 +688,8 @@ func (sb *backend) Stop() error {
688688 }
689689 sb .coreStarted = false
690690
691- if sb .IsQIBFTConsensus () {
692- sb .qibftConsensusEnabled = false
691+ if sb .IsQBFTConsensus () {
692+ sb .qbftConsensusEnabled = false
693693 }
694694
695695 return nil
@@ -724,7 +724,7 @@ func (sb *backend) snapshot(chain consensus.ChainHeaderReader, number uint64, ha
724724 }
725725 // Get the validators from genesis to create a snapshot
726726 var validators []common.Address
727- if sb .IsQIBFTConsensus () {
727+ if sb .IsQBFTConsensus () {
728728 qbftExtra , err := types .ExtractQbftExtra (genesis )
729729 if err != nil {
730730 return nil , err
@@ -768,7 +768,7 @@ func (sb *backend) snapshot(chain consensus.ChainHeaderReader, number uint64, ha
768768 for i := 0 ; i < len (headers )/ 2 ; i ++ {
769769 headers [i ], headers [len (headers )- 1 - i ] = headers [len (headers )- 1 - i ], headers [i ]
770770 }
771- snap , err := snap .apply (headers , sb .IsQIBFTConsensus (), sb .qbftBlockNumber ())
771+ snap , err := snap .apply (headers , sb .IsQBFTConsensus (), sb .qbftBlockNumber ())
772772 if err != nil {
773773 return nil , err
774774 }
@@ -808,10 +808,10 @@ func sigHash(header *types.Header, isQbftConsensus bool) (hash common.Hash) {
808808
809809// SealHash returns the hash of a block prior to it being sealed.
810810func (sb * backend ) SealHash (header * types.Header ) common.Hash {
811- if sb .IsQIBFTConsensus () {
811+ if sb .IsQBFTConsensus () {
812812 header .Coinbase = sb .address
813813 }
814- return sigHash (header , sb .IsQIBFTConsensus ())
814+ return sigHash (header , sb .IsQBFTConsensus ())
815815}
816816
817817// ecrecoverFromCoinbase extracts the Ethereum account address from coinbase.
0 commit comments