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

stake-pool: Truncate on withdrawal calculation #3804

Merged
merged 1 commit into from Nov 19, 2022

Conversation

joncinque
Copy link
Contributor

Problem

calc_lamports_for_withdraw does a ceiling calculation, which can overestimate the amount to return.

Solution

Remove the truncation, add some tests.

@joncinque joncinque merged commit 84182ce into solana-labs:master Nov 19, 2022
@joncinque joncinque deleted the sp-wtrunc branch November 19, 2022 00:43
HaoranYi pushed a commit to HaoranYi/solana-program-library that referenced this pull request Jul 19, 2023
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.

None yet

2 participants