lighthouse/consensus/state_processing/src
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
..
common Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
per_block_processing Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
per_epoch_processing Add safe_sum and use it in state_processing (#1620) 2020-09-22 05:40:04 +00:00
genesis.rs get_active_validator_indices() now has bound check (#1300) 2020-06-29 18:21:51 +10:00
lib.rs Process exits and slashings off the network (#1253) 2020-06-18 21:06:34 +10:00
macros.rs Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
per_block_processing.rs Remove redundant decompression in process_deposit (#1610) 2020-09-14 10:58:15 +00:00
per_epoch_processing.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
per_slot_processing.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
test_utils.rs Improve bls::SecretKey privacy (#1164) 2020-05-19 11:23:08 +10:00
verify_operation.rs Process exits and slashings off the network (#1253) 2020-06-18 21:06:34 +10:00