mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Add parent_block_number to payload SSE (#4053)
## Issue Addressed In #4027 I forgot to add the `parent_block_number` to the payload attributes SSE. ## Proposed Changes Compute the parent block number while computing the pre-payload attributes. Pass it on to the SSE stream. ## Additional Info Not essential for v3.5.1 as I suspect most builders don't need the `parent_block_root`. I would like to use it for my dummy no-op builder however.
This commit is contained in:
@@ -921,6 +921,8 @@ pub struct SseExtendedPayloadAttributesGeneric<T> {
|
||||
#[serde(with = "eth2_serde_utils::quoted_u64")]
|
||||
pub proposer_index: u64,
|
||||
pub parent_block_root: Hash256,
|
||||
#[serde(with = "eth2_serde_utils::quoted_u64")]
|
||||
pub parent_block_number: u64,
|
||||
pub parent_block_hash: ExecutionBlockHash,
|
||||
pub payload_attributes: T,
|
||||
}
|
||||
@@ -958,6 +960,7 @@ impl ForkVersionDeserialize for SseExtendedPayloadAttributes {
|
||||
proposal_slot: helper.proposal_slot,
|
||||
proposer_index: helper.proposer_index,
|
||||
parent_block_root: helper.parent_block_root,
|
||||
parent_block_number: helper.parent_block_number,
|
||||
parent_block_hash: helper.parent_block_hash,
|
||||
payload_attributes: SsePayloadAttributes::deserialize_by_fork::<D>(
|
||||
helper.payload_attributes,
|
||||
|
||||
Reference in New Issue
Block a user