lighthouse/consensus/state_processing
Michael Sproul 7aceff4d13 Add safe_sum and use it in state_processing (#1620)
## Issue Addressed

Closes #1098

## Proposed Changes

Add a `SafeArithIter` trait with a `safe_sum` method, and use it in `state_processing`. This seems to be the only place in `consensus` where it is relevant -- i.e. where we were using `sum` and the integer_arith lint is enabled.

## Additional Info

This PR doesn't include any Clippy linting to prevent `sum` from being called. It seems there is no existing Clippy lint that suits our purpose, but I'm going to look into that and maybe schedule writing one as a lower-priority task.

This theoretically _is_ a consensus breaking change, but it shouldn't impact Medalla (or any other testnet) because `slashings` shouldn't overflow!
2020-09-22 05:40:04 +00:00
..
benches Consensus updates for v0.12 (#1228) 2020-06-03 14:56:54 +10:00
src Add safe_sum and use it in state_processing (#1620) 2020-09-22 05:40:04 +00:00
tests Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
.gitignore Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
Cargo.toml Check for unused deps in CI (#1262) 2020-06-14 10:59:50 +10:00