mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Clean up blockv3 metadata and client (#5015)
* Improve block production v3 client * Delete wayward line * Overhaul JSON endpoint as well * Rename timeout param * Update tests * I broke everything * Ah this is an insane fix * Remove unnecessary optionals * Doc fix
This commit is contained in:
@@ -501,14 +501,14 @@ impl<E: EthSpec> BeaconBlockResponseWrapper<E> {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn execution_payload_value(&self) -> Option<Uint256> {
|
||||
pub fn execution_payload_value(&self) -> Uint256 {
|
||||
match self {
|
||||
BeaconBlockResponseWrapper::Full(resp) => resp.execution_payload_value,
|
||||
BeaconBlockResponseWrapper::Blinded(resp) => resp.execution_payload_value,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn consensus_block_value(&self) -> Option<u64> {
|
||||
pub fn consensus_block_value(&self) -> u64 {
|
||||
match self {
|
||||
BeaconBlockResponseWrapper::Full(resp) => resp.consensus_block_value,
|
||||
BeaconBlockResponseWrapper::Blinded(resp) => resp.consensus_block_value,
|
||||
@@ -529,9 +529,9 @@ pub struct BeaconBlockResponse<T: EthSpec, Payload: AbstractExecPayload<T>> {
|
||||
/// The Blobs / Proofs associated with the new block
|
||||
pub blob_items: Option<(KzgProofs<T>, BlobsList<T>)>,
|
||||
/// The execution layer reward for the block
|
||||
pub execution_payload_value: Option<Uint256>,
|
||||
pub execution_payload_value: Uint256,
|
||||
/// The consensus layer reward to the proposer
|
||||
pub consensus_block_value: Option<u64>,
|
||||
pub consensus_block_value: u64,
|
||||
}
|
||||
|
||||
impl FinalizationAndCanonicity {
|
||||
@@ -5286,8 +5286,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
block,
|
||||
state,
|
||||
blob_items,
|
||||
execution_payload_value: Some(execution_payload_value),
|
||||
consensus_block_value: Some(consensus_block_value),
|
||||
execution_payload_value,
|
||||
consensus_block_value,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5563,6 +5563,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
parent_block_hash: forkchoice_update_params.head_hash.unwrap_or_default(),
|
||||
payload_attributes: payload_attributes.into(),
|
||||
},
|
||||
metadata: Default::default(),
|
||||
version: Some(self.spec.fork_name_at_slot::<T::EthSpec>(prepare_slot)),
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user