Skip to content

Commit

Permalink
Simd-118: [HAL-01] add log to unreachable macro (anza-xyz#1767)
Browse files Browse the repository at this point in the history
Add log to unreachable macro
  • Loading branch information
CriesofCarrots authored and neutrinoks committed Jul 17, 2024
1 parent d68fa64 commit f227b7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/src/bank/partitioned_epoch_rewards/distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ impl Bank {
let (mut account, stake_state): (AccountSharedData, StakeStateV2) = stake_account.into();
let StakeStateV2::Stake(meta, stake, flags) = stake_state else {
// StakesCache only stores accounts where StakeStateV2::delegation().is_some()
unreachable!()
unreachable!(
"StakesCache entry {:?} failed StakeStateV2 deserialization",
partitioned_stake_reward.stake_pubkey
)
};
account
.checked_add_lamports(partitioned_stake_reward.stake_reward_info.lamports as u64)
Expand Down

0 comments on commit f227b7f

Please sign in to comment.