2021-10-18 17:48:05 +00:00
|
|
|
package node
|
|
|
|
|
2021-11-04 18:19:44 +00:00
|
|
|
import (
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/powchain"
|
|
|
|
)
|
2021-10-18 17:48:05 +00:00
|
|
|
|
|
|
|
// Option for beacon node configuration.
|
|
|
|
type Option func(bn *BeaconNode) error
|
|
|
|
|
|
|
|
// WithBlockchainFlagOptions includes functional options for the blockchain service related to CLI flags.
|
|
|
|
func WithBlockchainFlagOptions(opts []blockchain.Option) Option {
|
|
|
|
return func(bn *BeaconNode) error {
|
2021-11-04 18:19:44 +00:00
|
|
|
bn.serviceFlagOpts.blockchainFlagOpts = opts
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPowchainFlagOptions includes functional options for the powchain service related to CLI flags.
|
|
|
|
func WithPowchainFlagOptions(opts []powchain.Option) Option {
|
|
|
|
return func(bn *BeaconNode) error {
|
|
|
|
bn.serviceFlagOpts.powchainFlagOpts = opts
|
2021-10-18 17:48:05 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|