lighthouse/consensus
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
..
cached_tree_hash Update smallvec (#1339) 2020-07-07 16:57:27 +10:00
fork_choice Apply hotfix for inconsistent head (#1639) 2020-09-22 02:06:10 +00:00
int_to_bytes Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
merkle_proof Deny warnings on CI (#1372) 2020-07-21 05:51:33 +00:00
proto_array Shift HTTP server heavy-lifting to blocking executor (#1518) 2020-08-24 03:06:10 +00:00
safe_arith Add safe_sum and use it in state_processing (#1620) 2020-09-22 05:40:04 +00:00
serde_hex Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
serde_utils Add serde_utils module with quoted u64 support (#1588) 2020-09-07 01:03:53 +00:00
ssz Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
ssz_derive Fix eval order lint in ssz_derive (#1210) 2020-05-28 11:37:40 +10:00
ssz_types Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
state_processing Add safe_sum and use it in state_processing (#1620) 2020-09-22 05:40:04 +00:00
swap_or_not_shuffle Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
tree_hash Add caching for state.eth1_data_votes (#919) 2020-07-24 02:19:47 +00:00
tree_hash_derive Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
types Don't quote slot and epoch, for now (#1597) 2020-09-08 02:12:36 +00:00