Skip to content

Commit

Permalink
config: fix CreateConsensusEngineBareBones (#8154)
Browse files Browse the repository at this point in the history
Fix ``CreateConsensusEngineBareBones`` for bor and aura. Current codes
will pass a ``**chain.BorConfig`` or ``**chain.AuraConfig to``
``CreateConsensusEngine`` and cause a panic

Co-authored-by: Maohua Zhu <zhumaohua@cobo.com>
  • Loading branch information
neal-zhu and Maohua Zhu committed Sep 11, 2023
1 parent 346b278 commit 34c0df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/ethconsensusconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func CreateConsensusEngineBareBones(chainConfig *chain.Config, logger log.Logger
if chainConfig.Clique != nil {
consensusConfig = params.CliqueSnapshot
} else if chainConfig.Aura != nil {
consensusConfig = &chainConfig.Aura
consensusConfig = chainConfig.Aura
} else if chainConfig.Bor != nil {
consensusConfig = &chainConfig.Bor
consensusConfig = chainConfig.Bor
} else {
var ethashCfg ethashcfg.Config
ethashCfg.PowMode = ethashcfg.ModeFake
Expand Down

0 comments on commit 34c0df8

Please sign in to comment.