add warning if engine-api enabled without enabling sealing engine
This commit is contained in:
parent
9230e6a024
commit
d74e9cbf49
|
@ -191,6 +191,13 @@ proc localServices(nimbus: NimbusNode, conf: NimbusConf,
|
|||
nimbus.graphqlServer.start()
|
||||
|
||||
if conf.engineSigner != ZERO_ADDRESS:
|
||||
let res = nimbus.ctx.am.getAccount(conf.engineSigner)
|
||||
if res.isErr:
|
||||
error "Failed to get account",
|
||||
msg = res.error,
|
||||
hint = "--key-store or --import-key"
|
||||
quit(QuitFailure)
|
||||
|
||||
let rs = validateSealer(conf, nimbus.ctx, nimbus.chainRef)
|
||||
if rs.isErr:
|
||||
echo rs.error
|
||||
|
@ -239,6 +246,10 @@ proc localServices(nimbus: NimbusNode, conf: NimbusConf,
|
|||
setupEngineAPI(nimbus.sealingEngine, nimbus.wsRpcServer)
|
||||
|
||||
info "Starting WebSocket engine API server", port = conf.engineApiWsPort
|
||||
else:
|
||||
if conf.engineApiEnabled or conf.engineApiWsEnabled:
|
||||
warn "Cannot enable engine API without sealing engine",
|
||||
hint = "use --engine-signer to enable sealing engine"
|
||||
|
||||
# metrics server
|
||||
if conf.metricsEnabled:
|
||||
|
|
Loading…
Reference in New Issue