add balance to cap overflow message (#28975)
This commit is contained in:
parent
99d8929ab4
commit
19d86bd2b1
|
@ -706,9 +706,12 @@ impl AccountsHasher {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn checked_cast_for_capitalization(balance: u128) -> u64 {
|
pub fn checked_cast_for_capitalization(balance: u128) -> u64 {
|
||||||
balance
|
balance.try_into().unwrap_or_else(|_| {
|
||||||
.try_into()
|
panic!(
|
||||||
.expect("overflow is detected while summing capitalization")
|
"overflow is detected while summing capitalization: {}",
|
||||||
|
balance
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return references to cache hash data, grouped by bin, sourced from 'sorted_data_by_pubkey',
|
/// return references to cache hash data, grouped by bin, sourced from 'sorted_data_by_pubkey',
|
||||||
|
|
Loading…
Reference in New Issue