Skip to content

Commit

Permalink
ef-tests: derive Default for ef-tests structs (#9601)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored Jul 18, 2024
1 parent 7b4bf59 commit 54d3734
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testing/ef-tests/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct BlockchainTest {
}

/// A block header in an Ethereum blockchain test.
#[derive(Debug, PartialEq, Eq, Clone, Deserialize)]
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct Header {
/// Bloom filter.
Expand Down Expand Up @@ -120,7 +120,7 @@ impl From<Header> for SealedHeader {
}

/// A block in an Ethereum blockchain test.
#[derive(Debug, PartialEq, Eq, Deserialize)]
#[derive(Debug, PartialEq, Eq, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct Block {
/// Block header.
Expand All @@ -138,7 +138,7 @@ pub struct Block {
}

/// Transaction sequence in block
#[derive(Debug, PartialEq, Eq, Deserialize)]
#[derive(Debug, PartialEq, Eq, Deserialize, Default)]
#[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")]
pub struct TransactionSequence {
Expand All @@ -148,7 +148,7 @@ pub struct TransactionSequence {
}

/// Ethereum blockchain test data state.
#[derive(Clone, Debug, Eq, PartialEq, Deserialize)]
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Default)]
pub struct State(BTreeMap<Address, Account>);

impl State {
Expand Down Expand Up @@ -194,7 +194,7 @@ impl Deref for State {
}

/// An account.
#[derive(Debug, PartialEq, Eq, Deserialize, Clone)]
#[derive(Debug, PartialEq, Eq, Deserialize, Clone, Default)]
#[serde(deny_unknown_fields)]
pub struct Account {
/// Balance.
Expand Down

0 comments on commit 54d3734

Please sign in to comment.