mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make block field private (#13628)
This commit is contained in:
@ -84,7 +84,7 @@ where
|
||||
eyre::bail!("Invalid number of bodies received. Expected: 1. Received: 0")
|
||||
};
|
||||
|
||||
let block = SealedBlock { header, body };
|
||||
let block = SealedBlock::new(header, body);
|
||||
consensus.validate_block_pre_execution(&block)?;
|
||||
|
||||
Ok(block)
|
||||
|
||||
@ -254,7 +254,7 @@ impl NodeState {
|
||||
number=block.number(),
|
||||
hash=?block.hash(),
|
||||
peers=self.num_connected_peers(),
|
||||
txs=block.body.transactions().len(),
|
||||
txs=block.body().transactions().len(),
|
||||
gas=%format_gas(block.header.gas_used()),
|
||||
gas_throughput=%format_gas_throughput(block.header.gas_used(), elapsed),
|
||||
full=%format!("{:.1}%", block.header.gas_used() as f64 * 100.0 / block.header.gas_limit() as f64),
|
||||
|
||||
Reference in New Issue
Block a user