File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -479,6 +479,20 @@ func NewNode() (node *Node, err error) { // nolint: gocyclo
479479 }
480480 node .EntityID = entityID
481481
482+ requiresEntity := config .GlobalConfig .Consensus .Validator
483+ switch config .GlobalConfig .Mode {
484+ case config .ModeValidator , config .ModeCompute , config .ModeKeyManager , config .ModeObserver :
485+ requiresEntity = true
486+ }
487+
488+ if requiresEntity && entityID == nil {
489+ return nil , fmt .Errorf ("node has no entity configured but expects one" )
490+ }
491+
492+ if config .GlobalConfig .Mode == config .ModeClient && entityID != nil {
493+ return nil , fmt .Errorf ("client node must not have entity configured, try using observer mode instead" )
494+ }
495+
482496 // Load configured values for all registered crash points.
483497 crash .LoadViperArgValues ()
484498
You can’t perform that action at this time.
0 commit comments