Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants