Skip to content

Conversation

@madisoncarter1234
Copy link

Fixes #3775

When claim_reward fails with AlreadyClaimed, the error now includes the current unclaimed balance, lifetime rewards, and already claimed amount. This helps users understand if the claim failed due to a race condition (another claim succeeded) vs a genuine error.

Before: AlreadyClaimed()

After: Rewards already claimed. Current unclaimed balance: 0 (lifetime: 1000, claimed: 1000)

  error

  Fixes EspressoSystems#3775

  When claim_reward fails with AlreadyClaimed, the error now includes
  the current unclaimed balance, lifetime rewards, and already claimed
  amount. This helps users understand if the claim failed due to a
  race condition (another claim succeeded) vs a genuine error.

  Before: 'AlreadyClaimed()'
  After: 'Rewards already claimed. Current unclaimed balance: 0 (lifetime: 1000, claimed:
   1000)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

staking-cli: handle already claimed race-condition gracefully

1 participant