mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 05:18:30 +00:00
Fixed some BeaconChain Tests
This commit is contained in:
@@ -148,8 +148,8 @@ impl<T: EthSpec> From<FullPayload<T>> for ExecutionPayload<T> {
|
||||
}
|
||||
|
||||
impl<'a, T: EthSpec> From<FullPayloadRef<'a, T>> for ExecutionPayload<T> {
|
||||
fn from(full_payload: FullPayloadRef<'a, T>) -> Self {
|
||||
match full_payload {
|
||||
fn from(full_payload_ref: FullPayloadRef<'a, T>) -> Self {
|
||||
match full_payload_ref {
|
||||
FullPayloadRef::Merge(payload) => {
|
||||
ExecutionPayload::Merge(payload.execution_payload.clone())
|
||||
}
|
||||
@@ -163,6 +163,23 @@ impl<'a, T: EthSpec> From<FullPayloadRef<'a, T>> for ExecutionPayload<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: can this be implemented as Deref or Clone somehow?
|
||||
impl<'a, T: EthSpec> From<FullPayloadRef<'a, T>> for FullPayload<T> {
|
||||
fn from(full_payload_ref: FullPayloadRef<'a, T>) -> Self {
|
||||
match full_payload_ref {
|
||||
FullPayloadRef::Merge(payload_ref) => {
|
||||
FullPayload::Merge(payload_ref.clone())
|
||||
}
|
||||
FullPayloadRef::Capella(payload_ref) => {
|
||||
FullPayload::Capella(payload_ref.clone())
|
||||
}
|
||||
FullPayloadRef::Eip4844(payload_ref) => {
|
||||
FullPayload::Eip4844(payload_ref.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: EthSpec> ExecPayload<T> for FullPayload<T> {
|
||||
fn block_type() -> BlockType {
|
||||
BlockType::Full
|
||||
|
||||
Reference in New Issue
Block a user