Put the initialization of LC Store behind the enable-light-client flag (#15464)

* put lc store behind flag

* lint

* remove extra line
This commit is contained in:
Bastin
2025-07-02 13:09:37 +02:00
committed by GitHub
parent f133751cce
commit 2540196747
3 changed files with 11 additions and 1 deletions

View File

@@ -167,7 +167,6 @@ func New(cliCtx *cli.Context, cancel context.CancelFunc, opts ...Option) (*Beaco
syncChecker: &initialsync.SyncChecker{},
custodyInfo: &peerdas.CustodyInfo{},
slasherEnabled: cliCtx.Bool(flags.SlasherFlag.Name),
lcStore: &lightclient.Store{},
}
for _, opt := range opts {
@@ -235,6 +234,10 @@ func New(cliCtx *cli.Context, cancel context.CancelFunc, opts ...Option) (*Beaco
// their initialization.
beacon.finalizedStateAtStartUp = nil
if features.Get().EnableLightClient {
beacon.lcStore = lightclient.NewLightClientStore()
}
return beacon, nil
}