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

Refactor genesis testing params into HiveParams struct #2154

Open
Rjected opened this issue Feb 14, 2023 · 0 comments
Open

Refactor genesis testing params into HiveParams struct #2154

Rjected opened this issue Feb 14, 2023 · 0 comments

Comments

@Rjected
Copy link
Contributor

Rjected commented Feb 14, 2023

Is your feature request related to a problem? Please describe.

Currently the Genesis struct includes parameters that are used only for testing:

// The following fields are only included for tests, and should not be used in real genesis
// blocks.
/// The block number
#[serde(skip_serializing_if = "Option::is_none", default)]
pub number: Option<U64>,
/// The block gas gasUsed
#[serde(skip_serializing_if = "Option::is_none", default)]
pub gas_used: Option<U64>,
/// The block parent hash
#[serde(skip_serializing_if = "Option::is_none", default)]
pub parent_hash: Option<H256>,
/// The base fee
#[serde(skip_serializing_if = "Option::is_none", default)]
pub base_fee_per_gas: Option<U256>,

Describe the solution you'd like
These should be refactored out into a struct in combination with serde(flatten)

Additional context

I would consider putting this in a hive: HiveParams w/ serde(flatten) but we can leave for follow-up, we don't use the genesis type in other places either way

Originally posted by @gakonst in #2145 (comment)

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

No branches or pull requests

1 participant