Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genesis block in pallet-ethereum #79

Merged

Conversation

tgmichel
Copy link
Contributor

Rel #78

This PR sets the genesis block on pallet-ethereum storage and returns this block for requests using BlockNumber::Earliest as an argument.

@@ -74,6 +74,11 @@ decl_storage! {
TransactionStatuses: map hasher(blake2_128_concat) H256 => Option<TransactionStatus>;
Transactions: map hasher(blake2_128_concat) H256 => Option<(H256, u32)>;
}
add_extra_genesis {
build(|_config: &GenesisConfig| {
<Module<T>>::store_block(T::BlockNumber::from(0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only issue with this is that if the module is added after genesis, then it won't work, but I guess they would need migration scripts anyway.

@sorpaas sorpaas merged commit 5f1ad2b into polkadot-evm:master Jul 22, 2020
@tgmichel tgmichel deleted the tgmichel-genesis-block branch October 7, 2020 09:13
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Store genesis block in pallet-ethereum

* Return genesis block on BlockNumber::Earliest

* Styling fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants