From b1741bd86befc32cc2d1a8f3607805b19094866b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 26 Feb 2023 00:49:37 +0100 Subject: [PATCH] fix: rm duplicate size field (#1563) --- crates/rpc/rpc-types/src/eth/block.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/rpc/rpc-types/src/eth/block.rs b/crates/rpc/rpc-types/src/eth/block.rs index fc045e331e..a5dde53f09 100644 --- a/crates/rpc/rpc-types/src/eth/block.rs +++ b/crates/rpc/rpc-types/src/eth/block.rs @@ -61,7 +61,7 @@ pub struct Block { pub uncles: Vec, /// Transactions pub transactions: BlockTransactions, - /// Size in bytes + /// Integer the size of this block in bytes. pub size: Option, /// Base Fee for post-EIP1559 blocks. #[serde(skip_serializing_if = "Option::is_none")] @@ -208,8 +208,6 @@ pub struct Header { pub mix_hash: H256, /// Nonce pub nonce: Option, - /// Size in bytes - pub size: Option, } // === impl Header === @@ -219,8 +217,6 @@ impl Header { /// /// CAUTION: this takes the header's hash as is and does _not_ calculate the hash. pub fn from_primitive_with_hash(primitive_header: PrimitiveHeader, block_hash: H256) -> Self { - let header_length = primitive_header.length(); - let PrimitiveHeader { parent_hash, ommers_hash, @@ -260,7 +256,6 @@ impl Header { difficulty, mix_hash, nonce: Some(nonce.to_be_bytes().into()), - size: Some(U256::from(header_length)), } } }