mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
style: take ownership of header arg (#1626)
This commit is contained in:
@ -41,7 +41,7 @@ pub(crate) fn create_raw_bodies<'a>(
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|header| {
|
.map(|header| {
|
||||||
let body = bodies.remove(&header.hash()).expect("body exists");
|
let body = bodies.remove(&header.hash()).expect("body exists");
|
||||||
body.create_block(header)
|
body.create_block(header.as_ref().clone())
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,9 +87,9 @@ pub struct BlockBody {
|
|||||||
|
|
||||||
impl BlockBody {
|
impl BlockBody {
|
||||||
/// Create a [`Block`](reth_primitives::Block) from the body and its header.
|
/// Create a [`Block`](reth_primitives::Block) from the body and its header.
|
||||||
pub fn create_block(&self, header: &Header) -> Block {
|
pub fn create_block(&self, header: Header) -> Block {
|
||||||
Block {
|
Block {
|
||||||
header: header.clone(),
|
header,
|
||||||
body: self.transactions.clone(),
|
body: self.transactions.clone(),
|
||||||
ommers: self.ommers.clone(),
|
ommers: self.ommers.clone(),
|
||||||
withdrawals: self.withdrawals.clone(),
|
withdrawals: self.withdrawals.clone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user