@@ -37,9 +37,9 @@ import (
3737 "github.com/ethereum/go-ethereum/rpc"
3838)
3939
40- // Register adds catalyst APIs to the full node.
40+ // Register adds the engine API to the full node.
4141func Register (stack * node.Node , backend * eth.Ethereum ) error {
42- log .Warn ("Catalyst mode enabled" , "protocol" , "eth" )
42+ log .Warn ("Engine API enabled" , "protocol" , "eth" )
4343 stack .RegisterAPIs ([]rpc.API {
4444 {
4545 Namespace : "engine" ,
@@ -62,7 +62,7 @@ type ConsensusAPI struct {
6262// The underlying blockchain needs to have a valid terminal total difficulty set.
6363func NewConsensusAPI (eth * eth.Ethereum ) * ConsensusAPI {
6464 if eth .BlockChain ().Config ().TerminalTotalDifficulty == nil {
65- panic ( "Catalyst started without valid total difficulty" )
65+ log . Warn ( "Engine API started without valid total difficulty" )
6666 }
6767 return & ConsensusAPI {
6868 eth : eth ,
@@ -73,7 +73,7 @@ func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {
7373
7474// ForkchoiceUpdatedV1 has several responsibilities:
7575// If the method is called with an empty head block:
76- // we return success, which can be used to check if the catalyst mode is enabled
76+ // we return success, which can be used to check if the engine API is enabled
7777// If the total difficulty was not reached:
7878// we return INVALID
7979// If the finalizedBlockHash is set:
@@ -223,7 +223,7 @@ func (api *ConsensusAPI) ExchangeTransitionConfigurationV1(config beacon.Transit
223223 return nil , errors .New ("invalid terminal total difficulty" )
224224 }
225225 ttd := api .eth .BlockChain ().Config ().TerminalTotalDifficulty
226- if ttd .Cmp (config .TerminalTotalDifficulty .ToInt ()) != 0 {
226+ if ttd == nil || ttd .Cmp (config .TerminalTotalDifficulty .ToInt ()) != 0 {
227227 log .Warn ("Invalid TTD configured" , "geth" , ttd , "beacon" , config .TerminalTotalDifficulty )
228228 return nil , fmt .Errorf ("invalid ttd: execution %v consensus %v" , ttd , config .TerminalTotalDifficulty )
229229 }
0 commit comments