mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
consensus: refactor build_header_template (#10442)
This commit is contained in:
@ -287,25 +287,18 @@ impl StorageInner {
|
||||
let mut header = Header {
|
||||
parent_hash: self.best_hash,
|
||||
ommers_hash: proofs::calculate_ommers_root(ommers),
|
||||
beneficiary: Default::default(),
|
||||
state_root: Default::default(),
|
||||
transactions_root: proofs::calculate_transaction_root(transactions),
|
||||
receipts_root: Default::default(),
|
||||
withdrawals_root: withdrawals.map(|w| proofs::calculate_withdrawals_root(w)),
|
||||
logs_bloom: Default::default(),
|
||||
difficulty: U256::from(2),
|
||||
number: self.best_block + 1,
|
||||
gas_limit: chain_spec.max_gas_limit,
|
||||
gas_used: 0,
|
||||
timestamp,
|
||||
mix_hash: Default::default(),
|
||||
nonce: 0,
|
||||
base_fee_per_gas,
|
||||
blob_gas_used,
|
||||
excess_blob_gas: None,
|
||||
extra_data: Default::default(),
|
||||
parent_beacon_block_root: None,
|
||||
requests_root: requests.map(|r| proofs::calculate_requests_root(&r.0)),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
if chain_spec.is_cancun_active_at_timestamp(timestamp) {
|
||||
|
||||
Reference in New Issue
Block a user