mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
5a66807989
* First take at updating everything to v5 * Patch gRPC gateway to use prysm v5 Fix patch * Update go ssz --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
23 lines
812 B
Go
23 lines
812 B
Go
package backfill
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/node"
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/sync/backfill"
|
|
"github.com/prysmaticlabs/prysm/v5/cmd/beacon-chain/sync/backfill/flags"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// BeaconNodeOptions sets the appropriate functional opts on the *node.BeaconNode value, to decouple options
|
|
// from flag parsing.
|
|
func BeaconNodeOptions(c *cli.Context) ([]node.Option, error) {
|
|
opt := func(node *node.BeaconNode) (err error) {
|
|
node.BackfillOpts = []backfill.ServiceOption{
|
|
backfill.WithBatchSize(c.Uint64(flags.BackfillBatchSize.Name)),
|
|
backfill.WithWorkerCount(c.Int(flags.BackfillWorkerCount.Name)),
|
|
backfill.WithEnableBackfill(c.Bool(flags.EnableExperimentalBackfill.Name)),
|
|
}
|
|
return nil
|
|
}
|
|
return []node.Option{opt}, nil
|
|
}
|