mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-06 22:23:56 -05:00
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** Adds data column support to backfill. **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description to this PR with sufficient context for reviewers to understand this PR. --------- Co-authored-by: Kasey <kasey@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Preston Van Loon <preston@pvl.dev>
24 lines
822 B
Go
24 lines
822 B
Go
package backfill
|
|
|
|
import (
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/node"
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/sync/backfill"
|
|
"github.com/OffchainLabs/prysm/v7/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) {
|
|
bno := []backfill.ServiceOption{
|
|
backfill.WithBatchSize(c.Uint64(flags.BackfillBatchSize.Name)),
|
|
backfill.WithWorkerCount(c.Int(flags.BackfillWorkerCount.Name)),
|
|
backfill.WithEnableBackfill(c.Bool(flags.EnableExperimentalBackfill.Name)),
|
|
}
|
|
node.BackfillOpts = bno
|
|
return nil
|
|
}
|
|
return []node.Option{opt}, nil
|
|
}
|