Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display and log a better error in case escrow transaction does not pass MinDelegationAmount #3308

Closed
ptrus opened this issue Sep 23, 2020 · 2 comments · Fixed by #3720
Closed
Assignees
Labels
c:consensus/tendermint Category: Tendermint-based consensus c:staking Category: staking

Comments

@ptrus
Copy link
Member

ptrus commented Sep 23, 2020

Currently if an escrow transaction tries to delegate less than MinDelegationAmount the transaction fails with staking.ErrInvalidArgument and nothing is logged.

// Check if sender provided at least a minimum amount of stake.
if escrow.Amount.Cmp(&params.MinDelegationAmount) < 0 {
return staking.ErrInvalidArgument
}

@kostko kostko added c:consensus/tendermint Category: Tendermint-based consensus c:staking Category: staking labels Sep 23, 2020
@kostko
Copy link
Member

kostko commented Sep 23, 2020

We could introduce a separate error for this, although this would be a consensus-breaking change.

@ptrus
Copy link
Member Author

ptrus commented Sep 23, 2020

If we want to avoid a consensus-breaking change, then a good short-term improvement is just adding a log message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:consensus/tendermint Category: Tendermint-based consensus c:staking Category: staking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants