mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
Resolve merge confklicts
This commit is contained in:
@@ -356,6 +356,12 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> SignedBeaconBlock<E, Payload>
|
||||
self.message()
|
||||
.body()
|
||||
.blob_kzg_commitments()
|
||||
.or_else(|_| {
|
||||
self.message()
|
||||
.body()
|
||||
.signed_execution_payload_bid()
|
||||
.map(|bid| bid.message().blob_kzg_commitments())
|
||||
})
|
||||
.map(|c| c.len())
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::execution::{ExecutionPayloadBidGloas, ExecutionPayloadBidHeze, ExecutionPayloadBidRef};
|
||||
use crate::state::BeaconStateError;
|
||||
use crate::{EthSpec, ForkName};
|
||||
use crate::{Epoch, EthSpec, ForkName};
|
||||
use bls::Signature;
|
||||
use context_deserialize::{ContextDeserialize, context_deserialize};
|
||||
use educe::Educe;
|
||||
@@ -65,6 +65,10 @@ impl<E: EthSpec> SignedExecutionPayloadBid<E> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn epoch(&self) -> Epoch {
|
||||
self.message().slot().epoch(E::slots_per_epoch())
|
||||
}
|
||||
|
||||
pub fn empty_gloas() -> Self {
|
||||
Self::Gloas(SignedExecutionPayloadBidGloas {
|
||||
message: ExecutionPayloadBidGloas::default(),
|
||||
@@ -88,6 +92,17 @@ impl<'a, E: EthSpec> SignedExecutionPayloadBidRef<'a, E> {
|
||||
|inner, cons| { cons(&inner.message) }
|
||||
)
|
||||
}
|
||||
|
||||
pub fn epoch(&self) -> Epoch {
|
||||
self.message().slot().epoch(E::slots_per_epoch())
|
||||
}
|
||||
|
||||
pub fn to_owned(&self) -> SignedExecutionPayloadBid<E> {
|
||||
match self {
|
||||
Self::Gloas(inner) => SignedExecutionPayloadBid::Gloas((*inner).clone()),
|
||||
Self::Heze(inner) => SignedExecutionPayloadBid::Heze((*inner).clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> SignedExecutionPayloadBidGloas<E> {
|
||||
|
||||
@@ -47,7 +47,6 @@ async fn new_state<E: EthSpec>(validator_count: usize, slot: Slot) -> BeaconStat
|
||||
harness
|
||||
.add_attested_blocks_at_slots(
|
||||
head_state,
|
||||
Hash256::zero(),
|
||||
(1..=slot.as_u64())
|
||||
.map(Slot::new)
|
||||
.collect::<Vec<_>>()
|
||||
|
||||
@@ -39,7 +39,6 @@ async fn get_harness<E: EthSpec>(
|
||||
harness
|
||||
.add_attested_blocks_at_slots(
|
||||
state,
|
||||
Hash256::zero(),
|
||||
slots.as_slice(),
|
||||
(0..validator_count).collect::<Vec<_>>().as_slice(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user