mirror of
https://github.com/wealdtech/ethdo.git
synced 2026-01-09 14:07:56 -05:00
Update parameter names; add fallback connection.
Update parameter names to meet newer standards. Provide a fallback beacon node if none other supplied.
This commit is contained in:
@@ -45,11 +45,12 @@ In quiet mode this will return 0 if the validator information can be obtained, o
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := context.Background()
|
||||
|
||||
eth2Client, err := util.ConnectToBeaconNode(ctx,
|
||||
viper.GetString("connection"),
|
||||
viper.GetDuration("timeout"),
|
||||
viper.GetBool("allow-insecure-connections"),
|
||||
)
|
||||
eth2Client, err := util.ConnectToBeaconNode(ctx, &util.ConnectOpts{
|
||||
Address: viper.GetString("connection"),
|
||||
Timeout: viper.GetDuration("timeout"),
|
||||
AllowInsecure: viper.GetBool("allow-insecure-connections"),
|
||||
LogFallback: !viper.GetBool("quiet"),
|
||||
})
|
||||
errCheck(err, "Failed to connect to Ethereum 2 beacon node")
|
||||
|
||||
if viper.GetString("validator") == "" {
|
||||
|
||||
Reference in New Issue
Block a user