Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions prdoc/pr_10225.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: "pallet_revive: use real storage when building the eth genesis block"
doc:
- audience: Runtime Dev
description: |-
When building the eth genesis block, query the real storage items that store the timestamp and block number instead of using the zeroed items.
If the chainspec does not customise these, they will remain zeroed.
crates:
- name: pallet-revive
bump: patch
5 changes: 3 additions & 2 deletions substrate/frame/revive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,11 @@ pub mod pallet {
// Build genesis block
block_storage::on_finalize_build_eth_block::<T>(
H160::zero(),
U256::zero(),
frame_system::Pallet::<T>::block_number().into(),
Pallet::<T>::evm_base_fee(),
Pallet::<T>::evm_block_gas_limit(),
U256::zero(),
// Eth uses timestamps in seconds
(T::Time::now() / 1000u32.into()).into(),
Comment thread
iulianbarbu marked this conversation as resolved.
);

// Set debug settings.
Expand Down
Loading