Skip to content

Commit

Permalink
Fixed duplicate base_fee_per_gas
Browse files Browse the repository at this point in the history
  • Loading branch information
mdben1247 committed Aug 11, 2021
1 parent c921ea5 commit 3c401a6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/types/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct BlockHeader {
#[serde(rename = "gasLimit")]
pub gas_limit: U256,
/// Base fee per unit of gas (if past London)
#[serde(rename = "baseFeePerGas")]
#[serde(rename = "baseFeePerGas", skip_serializing_if = "Option::is_none")]
pub base_fee_per_gas: Option<U256>,
/// Extra data
#[serde(rename = "extraData")]
Expand All @@ -50,9 +50,6 @@ pub struct BlockHeader {
pub mix_hash: Option<H256>,
/// Nonce
pub nonce: Option<H64>,
/// Base fee
#[serde(rename = "baseFeePerGas", skip_serializing_if = "Option::is_none")]
pub base_fee_per_gas: Option<U256>,
}

/// The block type returned from RPC calls.
Expand Down Expand Up @@ -88,7 +85,7 @@ pub struct Block<TX> {
#[serde(rename = "gasLimit")]
pub gas_limit: U256,
/// Base fee per unit of gas (if past London)
#[serde(rename = "baseFeePerGas")]
#[serde(rename = "baseFeePerGas", skip_serializing_if = "Option::is_none")]
pub base_fee_per_gas: Option<U256>,
/// Extra data
#[serde(rename = "extraData")]
Expand All @@ -108,9 +105,6 @@ pub struct Block<TX> {
pub seal_fields: Vec<Bytes>,
/// Uncles' hashes
pub uncles: Vec<H256>,
/// Base fee
#[serde(rename = "baseFeePerGas", skip_serializing_if = "Option::is_none")]
pub base_fee_per_gas: Option<U256>,
/// Transactions
pub transactions: Vec<TX>,
/// Size in bytes
Expand Down

0 comments on commit 3c401a6

Please sign in to comment.