Bump ssz_types to v0.12.2 (#8032)

https://github.com/sigp/lighthouse/issues/8012


  Replace all instances of `VariableList::from` and `FixedVector::from` to their `try_from` variants.

While I tried to use proper error handling in most cases, there were certain situations where adding an `expect` for situations where `try_from` can trivially never fail avoided adding a lot of extra complexity.


Co-Authored-By: Mac L <mjladson@pm.me>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Mac L
2025-10-28 08:01:09 +04:00
committed by GitHub
parent 5840004c36
commit f5809aff87
39 changed files with 758 additions and 465 deletions

View File

@@ -17,7 +17,7 @@ pub fn indexed_att_electra(
target_root: u64,
) -> IndexedAttestation<E> {
IndexedAttestation::Electra(IndexedAttestationElectra {
attesting_indices: attesting_indices.as_ref().to_vec().into(),
attesting_indices: attesting_indices.as_ref().to_vec().try_into().unwrap(),
data: AttestationData {
slot: Slot::new(0),
index: 0,
@@ -42,7 +42,7 @@ pub fn indexed_att(
target_root: u64,
) -> IndexedAttestation<E> {
IndexedAttestation::Base(IndexedAttestationBase {
attesting_indices: attesting_indices.as_ref().to_vec().into(),
attesting_indices: attesting_indices.as_ref().to_vec().try_into().unwrap(),
data: AttestationData {
slot: Slot::new(0),
index: 0,