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

Add new error if stake delegation is below the minimum #25709

Conversation

brooksprumo
Copy link
Contributor

Problem

When the linked features are enabled, delegating a stake amount below the minimum will return with an error saying "Error: split amount is more than is staked", which is misleading since the error was caused during delegate and not split.

See linked Issue for more information.

Summary of Changes

Use new error if stake delegation is below the minimum.

Note, neither of the two linked feature are enabled, so no new feature-gate is required.

Fixes #25337
Feature Gate Issue: #24357
Feature Gate Issue: #24669

@brooksprumo brooksprumo added feature-gate Pull Request adds or modifies a runtime feature gate noCI Suppress CI on this Pull Request and removed noCI Suppress CI on this Pull Request labels Jun 1, 2022
@brooksprumo brooksprumo marked this pull request as ready for review June 1, 2022 21:29
@brooksprumo
Copy link
Contributor Author

@joncinque If CI passes, are there any other folks I should run this by as well?

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CI passes, :shipit: -- it's safely behind a feature gate

Edit: thanks for taking care of this!

@brooksprumo brooksprumo merged commit 0b2d529 into solana-labs:master Jun 2, 2022
@brooksprumo brooksprumo deleted the minimum-stake/error-on-delegation branch June 2, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stake: Delegating an amount below the minimum returns a misleading error message
2 participants