Skip to content

Commit

Permalink
Prompt for completing checkpoint bc it's expensive
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Aug 27, 2024
1 parent ea50f87 commit fe50074
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 fe50074

Please sign in to comment.