prysm-pulse/cmd/beacon-chain/blockchain/options.go
terence 5a66807989
Update to V5 (#13622)
* 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>
2024-02-15 05:46:47 +00:00

25 lines
770 B
Go

package blockchaincmd
import (
"github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain"
"github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/v5/cmd"
"github.com/prysmaticlabs/prysm/v5/cmd/beacon-chain/flags"
"github.com/urfave/cli/v2"
)
// FlagOptions for blockchain service flag configurations.
func FlagOptions(c *cli.Context) ([]blockchain.Option, error) {
wsp := c.String(flags.WeakSubjectivityCheckpoint.Name)
wsCheckpt, err := helpers.ParseWeakSubjectivityInputString(wsp)
if err != nil {
return nil, err
}
maxRoutines := c.Int(cmd.MaxGoroutines.Name)
opts := []blockchain.Option{
blockchain.WithMaxGoroutines(maxRoutines),
blockchain.WithWeakSubjectivityCheckpoint(wsCheckpt),
}
return opts, nil
}