Skip to content

Commit

Permalink
Merge pull request #141 from Layr-Labs/jb/prompt
Browse files Browse the repository at this point in the history
Prompt for completing checkpoint during `fix-stale-pod`
  • Loading branch information
jbrower95 authored Aug 27, 2024
2 parents ea50f87 + fe50074 commit 2ffb4e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cli/commands/staleBalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func FixStaleBalance(args TFixStaleBalanceArgs) error {
core.PanicOnError("failed to fetch any existing checkpoint info", err)

if currentCheckpointTimestamp > 0 {
if args.Verbose {
color.Red("This eigenpod has an outstanding checkpoint (since %d). You must complete it before continuing.", currentCheckpointTimestamp)
if !args.NoPrompt {
core.PanicIfNoConsent(fmt.Sprintf("This eigenpod has an outstanding checkpoint (since %d). You must complete it before continuing. This will invoke `EigenPod.verifyCheckpointProofs()`, which will end the checkpoint. This may be expensive.", currentCheckpointTimestamp))
}

proofs, err := core.GenerateCheckpointProof(ctx, args.EigenpodAddress, eth, chainId, beacon)
Expand All @@ -86,7 +86,7 @@ func FixStaleBalance(args TFixStaleBalanceArgs) error {
}

if args.Verbose {
color.Black("Calling verifyStaleBalance() to update pod.")
color.Black("Calling EigenPod.verifyStaleBalance() to force checkpoint this pod.")
}

txn, err := eigenpod.VerifyStaleBalance(
Expand All @@ -105,6 +105,5 @@ func FixStaleBalance(args TFixStaleBalanceArgs) error {
sentTxns = append(sentTxns, txn.Hash().Hex())

printAsJSON(sentTxns)

return nil
}

0 comments on commit 2ffb4e7

Please sign in to comment.