Skip to content

Commit

Permalink
node, rpc: fix error message, ignore engine api in RegisterAPIs
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Feb 23, 2022
1 parent 0c5bbfc commit 77df434
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/clef/main.go
Expand Up @@ -661,7 +661,7 @@ func signer(c *cli.Context) error {
if err != nil {
utils.Fatalf("Could not register API: %w", err)
}
handler := node.NewHTTPHandlerStack(srv, cors, vhosts)
handler := node.NewHTTPHandlerStack(srv, cors, vhosts, nil)

// set port
port := c.Int(rpcPortFlag.Name)
Expand Down
6 changes: 4 additions & 2 deletions node/endpoints.go
Expand Up @@ -60,8 +60,10 @@ func checkModuleAvailability(modules []string, apis []rpc.API) (bad, available [
}
}
for _, name := range modules {
if _, ok := availableSet[name]; !ok && name != rpc.MetadataApi {
bad = append(bad, name)
if _, ok := availableSet[name]; !ok {
if name != rpc.MetadataApi && name != rpc.EngineApi {
bad = append(bad, name)
}
}
}
return bad, available
Expand Down
1 change: 0 additions & 1 deletion node/node.go
Expand Up @@ -352,7 +352,6 @@ func (n *Node) obtainJWTSecret(cliParam string) ([]byte, error) {
if len(jwtSecret) == 32 {
return jwtSecret, nil
}
log.Warn("Discarding provided jwt secret", "size", len(jwtSecret))
}
jwtFile := n.ResolvePath(datadirJWTKey)
log.Debug("Reading jwt-key", "path", jwtFile)
Expand Down
1 change: 1 addition & 0 deletions rpc/server.go
Expand Up @@ -26,6 +26,7 @@ import (
)

const MetadataApi = "rpc"
const EngineApi = "engine"

// CodecOption specifies which type of messages a codec supports.
//
Expand Down

0 comments on commit 77df434

Please sign in to comment.