Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rpc-type-baecon) add default for header type #1669

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/rpc-types-beacon/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr};

/// The response to a request for beacon block headers: `getBlockHeaders`
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct HeadersResponse {
/// True if the response references an unverified execution payload. Optimistic information may
/// be invalidated at a later time. If the field is not present, assume the False value.
Expand All @@ -21,7 +21,7 @@ pub struct HeadersResponse {
}

/// The response to a request for a __single__ beacon block header: `headers/{id}`
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct HeaderResponse {
/// True if the response references an unverified execution payload. Optimistic information may
/// be invalidated at a later time. If the field is not present, assume the False value.
Expand All @@ -35,7 +35,7 @@ pub struct HeaderResponse {
}

/// Container type for a beacon block header.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct HeaderData {
/// root hash of the block
pub root: B256,
Expand All @@ -46,7 +46,7 @@ pub struct HeaderData {
}

/// [BeaconBlockHeader] with a signature.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct Header {
/// The [`BeaconBlockHeader`] object from the CL spec.
pub message: BeaconBlockHeader,
Expand All @@ -56,7 +56,7 @@ pub struct Header {

/// The header of a beacon block.
#[serde_as]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct BeaconBlockHeader {
/// The slot to which this block corresponds.
#[serde_as(as = "DisplayFromStr")]
Expand Down