Convert `checked_add` to `saturating_add` to fix downstream build (#2055)
This commit is contained in:
parent
b2980424df
commit
151eef0696
|
@ -1396,8 +1396,7 @@ impl Processor {
|
||||||
Some(stake_program::StakeState::Stake(meta, stake)) => {
|
Some(stake_program::StakeState::Stake(meta, stake)) => {
|
||||||
let account_stake = meta
|
let account_stake = meta
|
||||||
.rent_exempt_reserve
|
.rent_exempt_reserve
|
||||||
.checked_add(stake.delegation.stake)
|
.saturating_add(stake.delegation.stake);
|
||||||
.ok_or(StakePoolError::CalculationFailure)?;
|
|
||||||
if no_merge {
|
if no_merge {
|
||||||
transient_stake_lamports = account_stake;
|
transient_stake_lamports = account_stake;
|
||||||
} else if stake.delegation.deactivation_epoch < clock.epoch {
|
} else if stake.delegation.deactivation_epoch < clock.epoch {
|
||||||
|
|
Loading…
Reference in New Issue