File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,12 @@ func New(ethone consensus.Engine) *Beacon {
7272 return & Beacon {ethone : ethone }
7373}
7474
75+ // isPreMerge reports whether the given block number is assumed to be pre-merge.
76+ // Here we check the MergeNetsplitBlock to allow configuring networks with a PoW or
77+ // PoA chain for unit testing purposes.
7578func isPreMerge (config * params.ChainConfig , block uint64 ) bool {
76- return ! ( config .TerminalTotalDifficulty != nil && config .TerminalTotalDifficulty .Sign () == 0 ) ||
77- ( config .MergeNetsplitBlock != nil && block < config .MergeNetsplitBlock .Uint64 () )
79+ mergedAtGenesis := config .TerminalTotalDifficulty != nil && config .TerminalTotalDifficulty .Sign () == 0
80+ return ! mergedAtGenesis && config .MergeNetsplitBlock != nil && block < config .MergeNetsplitBlock .Uint64 ()
7881}
7982
8083// Author implements consensus.Engine, returning the verified author of the block.
You can’t perform that action at this time.
0 commit comments