## Issue Addressed
Fixes a potential regression in memory fragmentation identified by @paulhauner here: https://github.com/sigp/lighthouse/pull/3371#discussion_r931770045.
## Proposed Changes
Immediately allocate a vector with sufficient size to hold all decoded elements in SSZ decoding. The `size_hint` is derived from the range iterator here:
|
||
|---|---|---|
| .. | ||
| decode | ||
| encode | ||
| decode.rs | ||
| encode.rs | ||
| legacy.rs | ||
| lib.rs | ||
| union_selector.rs | ||