Skip to content

Commit c0b4a24

Browse files
committed
WIP
1 parent 5658269 commit c0b4a24

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

build/devenv/environment.go

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -311,20 +311,25 @@ func NewEnvironment() (in *Cfg, err error) {
311311
}
312312
}
313313

314-
// Start standalone executor if in standalone mode.
315-
if in.Executor != nil && in.Executor.Mode == services.Standalone {
316-
_, err = services.NewExecutor(in.Executor)
317-
if err != nil {
318-
return nil, fmt.Errorf("failed to create executor service: %w", err)
314+
// TODO: remove this if condition once configuration is injected into the node.
315+
// For now, if the core node is started, assume that it will launch all services.
316+
// TODO: Maybe it starts with just the verifiers.
317+
if !hasCLNodeService {
318+
// Start standalone executor if in standalone mode.
319+
if in.Executor != nil && in.Executor.Mode == services.Standalone {
320+
_, err = services.NewExecutor(in.Executor)
321+
if err != nil {
322+
return nil, fmt.Errorf("failed to create executor service: %w", err)
323+
}
319324
}
320-
}
321325

322-
// Start standalone verifiers if in standalone mode.
323-
for _, ver := range in.Verifier {
324-
if ver.Mode == services.Standalone {
325-
_, err = services.NewVerifier(ver)
326-
if err != nil {
327-
return nil, fmt.Errorf("failed to create verifier service: %w", err)
326+
// Start standalone verifiers if in standalone mode.
327+
for _, ver := range in.Verifier {
328+
if ver.Mode == services.Standalone {
329+
_, err = services.NewVerifier(ver)
330+
if err != nil {
331+
return nil, fmt.Errorf("failed to create verifier service: %w", err)
332+
}
328333
}
329334
}
330335
}

0 commit comments

Comments
 (0)