Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Oct 24, 2024
1 parent a96b05d commit dc58fc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
12 changes: 6 additions & 6 deletions crates/consensus/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ pub struct Block<T> {
pub body: BlockBody<T>,
}

// impl<T> Block<T> {
// /// Creates a new empty uncle block.
// pub fn uncle(header: Header) -> Self {
// Self { header, body: Default::default() }
// }
// }
impl<T> Block<T> {
/// Creates a new empty uncle block.
pub fn uncle(header: Header) -> Self {
Self { header, body: Default::default() }
}
}

/// A response to `GetBlockBodies`, containing bodies if any bodies were found.
///
Expand Down
14 changes: 2 additions & 12 deletions crates/rpc-types-eth/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,8 @@ impl<T> Block<T> {
header: header.clone().seal_slow().into(),
transactions: BlockTransactions::Uncle,
withdrawals: None,
size: Some(U256::from(
alloy_consensus::Block {
header,
body: alloy_consensus::BlockBody::<TxEnvelope> {
transactions: vec![],
ommers: vec![],
withdrawals: None,
},
}
.length(),
)),
}
size: Some(U256::from(alloy_consensus::Block::<TxEnvelope>::uncle(header).length())),
};
}
}

Expand Down

0 comments on commit dc58fc6

Please sign in to comment.