sum boost rewards

This commit is contained in:
alex
2024-10-14 02:14:22 -07:00
parent 681df6f96d
commit 6744270071

View File

@@ -147,7 +147,7 @@ pub fn process_mine(accounts: &[AccountInfo], data: &[u8]) -> ProgramResult {
// Apply multiplier if boost is not expired and last stake at was more than one minute ago.
if boost.expires_at.gt(&t) && stake.last_stake_at.saturating_add(ONE_MINUTE).le(&t) {
let multiplier = boost.multiplier.checked_sub(1).unwrap();
let boost_reward = (reward as u128)
let boost_reward = (base_reward as u128)
.checked_mul(multiplier as u128)
.unwrap()
.checked_mul(stake.balance as u128)