Skip to content

Commit

Permalink
cmd: specify exit fetch path (#3099)
Browse files Browse the repository at this point in the history
Allow users to specify a path to store fetched signed exit messages into.

category: bug 
ticket: none
  • Loading branch information
gsora authored May 27, 2024
1 parent 3722e4c commit dd8f1f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const (
exitEpoch
exitFromFile
beaconNodeTimeout
fetchedExitPath
publishTimeout
)

Expand All @@ -80,6 +81,8 @@ func (ef exitFlag) String() string {
return "exit-from-file"
case beaconNodeTimeout:
return "beacon-node-timeout"
case fetchedExitPath:
return "fetched-exit-path"
case publishTimeout:
return "publish-timeout"
default:
Expand Down Expand Up @@ -123,6 +126,8 @@ func bindExitFlags(cmd *cobra.Command, config *exitConfig, flags []exitCLIFlag)
cmd.Flags().StringVar(&config.ExitFromFilePath, exitFromFile.String(), "", maybeRequired("Retrieves a signed exit message from a pre-prepared file instead of --publish-address."))
case beaconNodeTimeout:
cmd.Flags().DurationVar(&config.BeaconNodeTimeout, beaconNodeTimeout.String(), 30*time.Second, maybeRequired("Timeout for beacon node HTTP calls."))
case fetchedExitPath:
cmd.Flags().StringVar(&config.FetchedExitPath, fetchedExitPath.String(), "./", maybeRequired("Path to store fetched signed exit messages."))
case publishTimeout:
cmd.Flags().DurationVar(&config.PublishTimeout, publishTimeout.String(), 30*time.Second, "Timeout for publishing a signed exit to the publish-address API.")
}
Expand Down
1 change: 1 addition & 0 deletions cmd/exit_fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func newFetchExitCmd(runFunc func(context.Context, exitConfig) error) *cobra.Com
{privateKeyPath, false},
{lockFilePath, false},
{validatorPubkey, true},
{fetchedExitPath, false},
})

bindLogFlags(cmd.Flags(), &config.Log)
Expand Down

0 comments on commit dd8f1f0

Please sign in to comment.