mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
fix tests
This commit is contained in:
@@ -9,7 +9,6 @@ use ssz_derive::Encode;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt::{self, Display};
|
||||
use std::str::{from_utf8, FromStr};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
pub use types::*;
|
||||
|
||||
@@ -1410,8 +1409,6 @@ pub type BlockContentsTuple<T, Payload> = (
|
||||
Option<SignedBlobSidecarList<T>>,
|
||||
);
|
||||
|
||||
pub type ArcBlockContentsTuple<T> = (Arc<SignedBeaconBlock<T>>, Option<SignedBlobSidecarList<T>>);
|
||||
|
||||
/// A wrapper over a [`SignedBeaconBlock`] or a [`SignedBeaconBlockAndBlobSidecars`].
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
@@ -1445,6 +1442,15 @@ impl<T: EthSpec, Payload: AbstractExecPayload<T>> SignedBlockContents<T, Payload
|
||||
}
|
||||
}
|
||||
|
||||
pub fn blobs_cloned(&self) -> Option<SignedBlobSidecarList<T>> {
|
||||
match self {
|
||||
SignedBlockContents::BlockAndBlobSidecars(block_and_sidecars) => {
|
||||
Some(block_and_sidecars.signed_blob_sidecars.clone())
|
||||
}
|
||||
SignedBlockContents::Block(_block) => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn deconstruct(self) -> BlockContentsTuple<T, Payload> {
|
||||
match self {
|
||||
SignedBlockContents::BlockAndBlobSidecars(block_and_sidecars) => (
|
||||
|
||||
Reference in New Issue
Block a user