mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Resolve into_attestation_and_indices todo
This commit is contained in:
@@ -6,6 +6,7 @@ use super::{
|
||||
Signature, SignedRoot,
|
||||
};
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::Attestation;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use superstruct::superstruct;
|
||||
@@ -109,4 +110,11 @@ impl<E: EthSpec> SignedAggregateAndProof<E> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_attestation(self) -> Attestation<E> {
|
||||
match self {
|
||||
Self::Base(att) => Attestation::Base(att.message.aggregate),
|
||||
Self::Electra(att) => Attestation::Electra(att.message.aggregate),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user