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

eth,les,light,params: fix CHT handling for forked chains #95

Merged
merged 2 commits into from Jun 10, 2019

Conversation

meowsbits
Copy link
Collaborator

Keying CHTs by genesis precludes the possibility of valid chain
config between networks sharing genesis blocks.

Keying CHTs by genesis precludes the possibility of valid chain
config between networks sharing genesis blocks.
@meowsbits meowsbits requested review from tzdybal and sorpaas June 9, 2019 20:27
Copy link
Collaborator

@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

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

I found small issue in test - code can be simplified.

Beside this, LGTM.

@@ -506,8 +506,12 @@ func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpo
var (
db = rawdb.NewMemoryDatabase()
config = new(params.ChainConfig)
genesis = (&core.Genesis{Config: config}).MustCommit(db)
genesis *types.Block
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can remove genesis variable...

)

genesis = (&core.Genesis{Config: config}).MustCommit(db)
Copy link
Collaborator

Choose a reason for hiding this comment

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

... and simply ignore the return value from MustCommit, because it's actually what we're doing anyways.

@whilei whilei merged commit 0bb7fc9 into multi-geth:master Jun 10, 2019
@soc1c soc1c deleted the fix/cht-chainparams branch June 11, 2019 08:32
meowsbits added a commit to meowsbits/multi-geth that referenced this pull request Jan 28, 2020
cmd/echainspec,build: reimplement echainspec command
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

3 participants