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

use Option for CliqueConfig fields #2162

Merged
merged 1 commit into from Feb 17, 2023

Conversation

Rjected
Copy link
Contributor

@Rjected Rjected commented Feb 17, 2023

Motivation

The CliqueConfig field of a genesis file does not necessarily require both a populated epoch and period field. This results in a ChainConfig like the following to fail to parse:

"config": {
  "clique": {
    "period": 1
  },
  "chainId": 7,
  "homesteadBlock": 0,
  "eip150Block": 0,
  "eip155Block": 0,
  "eip158Block": 0
},

Solution

Change the CliqueConfig fields to be options, and include serde(default) for deserialization.

Add a test for deserializing a genesis.json passed from hive, that only has the period field.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

@gakonst gakonst merged commit 228f944 into gakonst:master Feb 17, 2023
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.

None yet

2 participants