Convert `checked_add` to `saturating_add` to fix downstream build (#2055)

This commit is contained in:
Jon Cinque 2021-07-12 12:50:28 +02:00 committed by GitHub
parent b2980424df
commit 151eef0696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1396,8 +1396,7 @@ impl Processor {
Some(stake_program::StakeState::Stake(meta, stake)) => {
let account_stake = meta
.rent_exempt_reserve
.checked_add(stake.delegation.stake)
.ok_or(StakePoolError::CalculationFailure)?;
.saturating_add(stake.delegation.stake);
if no_merge {
transient_stake_lamports = account_stake;
} else if stake.delegation.deactivation_epoch < clock.epoch {