Skip to content

Commit

Permalink
eth/catalyst: rename catalyst -> Engine API in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Jul 21, 2022
1 parent 661c3e0 commit 6c5f9ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (ethapi.Backend
}
stack.RegisterAPIs(tracers.APIs(backend.ApiBackend))
if err := lescatalyst.Register(stack, backend); err != nil {
Fatalf("Failed to register the catalyst service: %v", err)
Fatalf("Failed to register the Engine API service: %v", err)
}
return backend.ApiBackend, nil
}
Expand All @@ -2009,7 +2009,7 @@ func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (ethapi.Backend
}
}
if err := ethcatalyst.Register(stack, backend); err != nil {
Fatalf("Failed to register the catalyst service: %v", err)
Fatalf("Failed to register the Engine API service: %v", err)
}
stack.RegisterAPIs(tracers.APIs(backend.APIBackend))
return backend.APIBackend, backend
Expand Down
8 changes: 4 additions & 4 deletions eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)

// Register adds catalyst APIs to the full node.
// Register adds the engine API to the full node.
func Register(stack *node.Node, backend *eth.Ethereum) error {
log.Warn("Catalyst mode enabled", "protocol", "eth")
log.Warn("Engine API enabled", "protocol", "eth")
stack.RegisterAPIs([]rpc.API{
{
Namespace: "engine",
Expand All @@ -62,7 +62,7 @@ type ConsensusAPI struct {
// The underlying blockchain needs to have a valid terminal total difficulty set.
func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {
if eth.BlockChain().Config().TerminalTotalDifficulty == nil {
log.Warn("Catalyst started without valid total difficulty")
panic("Engine API started without valid total difficulty")
}
return &ConsensusAPI{
eth: eth,
Expand All @@ -73,7 +73,7 @@ func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {

// ForkchoiceUpdatedV1 has several responsibilities:
// If the method is called with an empty head block:
// we return success, which can be used to check if the catalyst mode is enabled
// we return success, which can be used to check if the engine API is enabled
// If the total difficulty was not reached:
// we return INVALID
// If the finalizedBlockHash is set:
Expand Down

0 comments on commit 6c5f9ba

Please sign in to comment.