Sdk: start to appease clippy's integer arithmetic check (#15736)
* Move to module-level clippy allowance * Fix stake_weighted_timestamp math * Fix genesis_config * Fix shred_version * Fix hard_forks * Fix process_instruction * Add ArithmeticOverflow ix error * Fix nonce_keyed_account * Update BankSlotDelta frozen abi due to new ix error
This commit is contained in:
@@ -18,7 +18,7 @@ impl HardForks {
|
||||
.iter()
|
||||
.position(|(slot, _)| *slot == new_slot)
|
||||
{
|
||||
self.hard_forks[i] = (new_slot, self.hard_forks[i].1 + 1);
|
||||
self.hard_forks[i] = (new_slot, self.hard_forks[i].1.saturating_add(1));
|
||||
} else {
|
||||
self.hard_forks.push((new_slot, 1));
|
||||
}
|
||||
|
Reference in New Issue
Block a user