eth/catalyst: add catalyst API prototype (#22641)
This change adds the --catalyst flag, enabling an RPC API for eth2 integration. In this initial version, catalyst mode also disables all peer-to-peer networking. Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
@ -315,6 +315,8 @@ func (ethash *Ethash) CalcDifficulty(chain consensus.ChainHeaderReader, time uin
|
||||
func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int {
|
||||
next := new(big.Int).Add(parent.Number, big1)
|
||||
switch {
|
||||
case config.IsCatalyst(next):
|
||||
return big.NewInt(1)
|
||||
case config.IsMuirGlacier(next):
|
||||
return calcDifficultyEip2384(time, parent)
|
||||
case config.IsConstantinople(next):
|
||||
|
Reference in New Issue
Block a user