mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
Resolve merge conflicts
This commit is contained in:
@@ -3,6 +3,7 @@ use ssz::{Decode, Encode};
|
||||
use types::{
|
||||
EthSpec, ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella,
|
||||
ExecutionPayloadDeneb, ExecutionPayloadEip7805, ExecutionPayloadElectra, ExecutionPayloadFulu,
|
||||
ExecutionPayloadGloas,
|
||||
};
|
||||
|
||||
macro_rules! impl_store_item {
|
||||
@@ -26,8 +27,9 @@ impl_store_item!(ExecutionPayloadBellatrix);
|
||||
impl_store_item!(ExecutionPayloadCapella);
|
||||
impl_store_item!(ExecutionPayloadDeneb);
|
||||
impl_store_item!(ExecutionPayloadElectra);
|
||||
impl_store_item!(ExecutionPayloadEip7805);
|
||||
impl_store_item!(ExecutionPayloadFulu);
|
||||
impl_store_item!(ExecutionPayloadEip7805);
|
||||
impl_store_item!(ExecutionPayloadGloas);
|
||||
|
||||
/// This fork-agnostic implementation should be only used for writing.
|
||||
///
|
||||
@@ -43,28 +45,32 @@ impl<E: EthSpec> StoreItem for ExecutionPayload<E> {
|
||||
}
|
||||
|
||||
fn from_store_bytes(bytes: &[u8]) -> Result<Self, Error> {
|
||||
ExecutionPayloadFulu::from_ssz_bytes(bytes)
|
||||
.map(Self::Fulu)
|
||||
.or_else(|_| {
|
||||
ExecutionPayloadEip7805::from_ssz_bytes(bytes)
|
||||
.map(Self::Eip7805)
|
||||
.or_else(|_| {
|
||||
ExecutionPayloadElectra::from_ssz_bytes(bytes)
|
||||
.map(Self::Electra)
|
||||
.or_else(|_| {
|
||||
ExecutionPayloadDeneb::from_ssz_bytes(bytes)
|
||||
.map(Self::Deneb)
|
||||
.or_else(|_| {
|
||||
ExecutionPayloadCapella::from_ssz_bytes(bytes)
|
||||
.map(Self::Capella)
|
||||
.or_else(|_| {
|
||||
ExecutionPayloadBellatrix::from_ssz_bytes(bytes)
|
||||
.map(Self::Bellatrix)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
if let Ok(payload) = ExecutionPayloadGloas::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Gloas(payload));
|
||||
}
|
||||
|
||||
if let Ok(payload) = ExecutionPayloadEip7805::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Eip7805(payload));
|
||||
}
|
||||
|
||||
if let Ok(payload) = ExecutionPayloadFulu::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Fulu(payload));
|
||||
}
|
||||
|
||||
if let Ok(payload) = ExecutionPayloadElectra::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Electra(payload));
|
||||
}
|
||||
|
||||
if let Ok(payload) = ExecutionPayloadDeneb::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Deneb(payload));
|
||||
}
|
||||
|
||||
if let Ok(payload) = ExecutionPayloadCapella::from_ssz_bytes(bytes) {
|
||||
return Ok(Self::Capella(payload));
|
||||
}
|
||||
|
||||
ExecutionPayloadBellatrix::from_ssz_bytes(bytes)
|
||||
.map(Self::Bellatrix)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user