Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bap2pecs committed Nov 22, 2024
1 parent 9110414 commit 03bdb35
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions finality-provider/cmd/fpd/daemon/commit_pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
bbntypes "github.com/babylonlabs-io/babylon/types"
fpcc "github.com/babylonlabs-io/finality-provider/clientcontroller"
eotsclient "github.com/babylonlabs-io/finality-provider/eotsmanager/client"
fpcmd "github.com/babylonlabs-io/finality-provider/finality-provider/cmd"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
"github.com/babylonlabs-io/finality-provider/finality-provider/service"
"github.com/babylonlabs-io/finality-provider/finality-provider/store"
Expand All @@ -30,13 +29,13 @@ func CommandCommitPubRand() *cobra.Command {
WARNING: this can drain the finality provider's balance if the target height is too high.`,
Example: `fpd unsafe-commit-pubrand --home /home/user/.fpd [fp-eots-pk-hex] [target-height]`,
Args: cobra.ExactArgs(2),
RunE: fpcmd.RunEWithClientCtx(runCommandCommitPubRand),
RunE: runCommandCommitPubRand,
}
cmd.Flags().Uint64("start-height", math.MaxUint64, "The block height to start committing pubrand from (optional)")
return cmd
}

func runCommandCommitPubRand(ctx client.Context, cmd *cobra.Command, args []string) error {
func runCommandCommitPubRand(cmd *cobra.Command, args []string) error {
fpPk, err := bbntypes.NewBIP340PubKeyFromHex(args[0])
if err != nil {
return err
Expand Down Expand Up @@ -99,7 +98,6 @@ func runCommandCommitPubRand(ctx client.Context, cmd *cobra.Command, args []stri

if startHeight == math.MaxUint64 {
return fp.TestCommitPubRand(targetHeight)
} else {
return fp.TestCommitPubRandWithStartHeight(startHeight, targetHeight)
}
return fp.TestCommitPubRandWithStartHeight(startHeight, targetHeight)
}

0 comments on commit 03bdb35

Please sign in to comment.