mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Rust 1.71 lints (#4503)
## Issue Addressed N/A ## Proposed Changes Add lints for rust 1.71 [3789134](3789134ae2) is probably the one that needs most attention as it changes beacon state code. I changed the `is_in_inactivity_leak ` function to return a `ArithError` as not all consumers of that function work well with a `BeaconState::Error`.
This commit is contained in:
@@ -86,7 +86,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
let ideal_reward = reward_numerator
|
||||
.safe_div(active_increments)?
|
||||
.safe_div(WEIGHT_DENOMINATOR)?;
|
||||
if !state.is_in_inactivity_leak(previous_epoch, spec) {
|
||||
if !state.is_in_inactivity_leak(previous_epoch, spec)? {
|
||||
ideal_rewards_hashmap
|
||||
.insert((flag_index, effective_balance), (ideal_reward, penalty));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user