diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 7b4656da1f6..107d2404560 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -98,6 +98,10 @@ func (c *Core) ValidateConfig() (err error) { err = multierr.Append(err, configutils.ErrInvalid{Name: "RootDir", Value: true, Msg: fmt.Sprintf("Failed to expand RootDir. Please use an explicit path: %s", verr)}) } + if (*c.OCR.Enabled || *c.OCR2.Enabled) && !*c.P2P.V2.Enabled { + err = multierr.Append(err, configutils.ErrInvalid{Name: "OCRP2P", Value: true, Msg: fmt.Sprint("P2P required for OCR or OCR2. Please configure P2P or disable OCR/OCR2.")}) + } + return err }