solana-program-library/stake-pool/program
Jon Cinque d336b8b714
stake-pool: Use checked_ceil_div for withdraw calc (#1482)
* stake-pool: Use checked_ceil_div for withdraw calc

When a stake account is totally removed from a stake pool by the
manager, there's a chance that the operation would not take enough of
the manager's pool tokens by 1 due to truncation.

Do a ceiling division instead, and refactor ceiling division into the
math library.

* Use new function name on CLI

* Cargo fmt
2021-03-23 00:33:51 +01:00
..
src stake-pool: Use checked_ceil_div for withdraw calc (#1482) 2021-03-23 00:33:51 +01:00
tests Set staking authority instruction removed (#1469) 2021-03-18 12:21:01 +01:00
Cargo.toml stake-pool: Use checked_ceil_div for withdraw calc (#1482) 2021-03-23 00:33:51 +01:00
Xargo.toml Token stake pool (#493) 2020-10-16 19:38:12 +02:00
program-id.md stake-pool-cli: Update RPC client per TODO (#1304) 2021-02-23 00:28:06 +01:00