forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Withdraw available stake #441
Open
najeal
wants to merge
13
commits into
anza-xyz:master
Choose a base branch
from
najeal:withdraw-available-stack
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+366
−17
Open
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
da13df2
clap-utils: add AVAILABLE as a valid keyword
najeal 2267dde
update usage of valid keyword
najeal 67e9d07
cli: create get_account_stake_state as reusable function
najeal 7bc4fe9
cli: spend available amount of lamports
najeal 115a662
fix lint
najeal 265faf7
Apply suggestions from code review
najeal f9ede8e
revert usage of is_amount_or_all_or_available in non-stake-withdraw s…
najeal a89030f
run cargo fmt
najeal 2db734a
cli: revert nits
najeal 290a620
cli: withdraw stak - minimum rent exempt is also fetch when using AVA…
najeal 7123c42
stake withdraw: subtract minimum_rent_exempt from available amount wh…
najeal 7f51740
update spend utils handling deactivating_stake
najeal 574ce66
cli/tests: stake withdraw available / all
najeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this isn't quite right. If there's no active stake, the rent-exempt reserve is available to be withdrawn. So the rent-exempt minimum only needs to be subtracted when
active_stake
is Some.I think we need to do this on L133 above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can either:
What do you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer option 1