mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Merge branch 'gloas-payload-cache' into glamsterdam-devnet-2
This commit is contained in:
@@ -354,6 +354,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)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,14 @@ pub struct SignedExecutionPayloadBid<E: EthSpec> {
|
||||
}
|
||||
|
||||
impl<E: EthSpec> SignedExecutionPayloadBid<E> {
|
||||
pub fn epoch(&self) -> crate::Epoch {
|
||||
self.message.slot.epoch(E::slots_per_epoch())
|
||||
}
|
||||
|
||||
pub fn slot(&self) -> crate::Slot {
|
||||
self.message.slot
|
||||
}
|
||||
|
||||
pub fn empty() -> Self {
|
||||
Self {
|
||||
message: ExecutionPayloadBid::default(),
|
||||
|
||||
Reference in New Issue
Block a user