lighthouse-pulse/consensus
Paul Hauner 7c059117f4 Avoid resizing attn signature sets vec (#2184)
## Issue Addressed

NA

## Proposed Changes

Reduces allocations by initializing the `pubkeys` vec to its final size. I doubt this will make a substantial difference, but it's nice to do it this way.

Seeing as `indexed_attestation.attesting_indices` has a [fixed length](e4b62139d7/consensus/types/src/indexed_attestation.rs (L22)), there's no real risk of a memory blow-up by pre-allocating the size of the `Vec`.

## Additional Info

NA
2021-02-09 02:00:51 +00:00
..
cached_tree_hash Clippy 1.49.0 updates and dht persistence test fix (#2156) 2021-01-19 00:34:28 +00:00
fork_choice Fix new clippy lints (#2036) 2020-12-03 01:10:26 +00:00
int_to_bytes Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00
merkle_proof Implement matches! macro (#1777) 2020-10-15 21:42:43 +00:00
proto_array Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00
safe_arith Remove saturating arith from state_processing (#1644) 2020-09-25 05:18:21 +00:00
serde_utils Fix new clippy lints (#2036) 2020-12-03 01:10:26 +00:00
ssz Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00
ssz_derive Clippy 1.49.0 updates and dht persistence test fix (#2156) 2021-01-19 00:34:28 +00:00
ssz_types Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00
state_processing Avoid resizing attn signature sets vec (#2184) 2021-02-09 02:00:51 +00:00
swap_or_not_shuffle Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00
tree_hash fix a couple typos in comments in merkle_hasher (#2171) 2021-02-03 04:52:22 +00:00
tree_hash_derive Clippy 1.49.0 updates and dht persistence test fix (#2156) 2021-01-19 00:34:28 +00:00
types Fix clippy errors on tests (#2160) 2021-01-28 23:31:06 +00:00