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

cmd/utils: reuse existing genesis in persistent dev mode #21352

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Jul 21, 2020

Fixes #21323 (comment).

We've updated the dev mode genesis block to seed some new precompiles. Unfortunately, in dev mode with persistent database we didn't load the genesis from disk, rather always regenerated it and it just happened to match the one on disk. With the changed seeding, any old persisted dev chain became unloadable because of a genesis mismatch.

This PR fixes it by checking the provided data directory for an already initialized chain, and if so, dev mode uses that and does not try to generate a new genesis spec.

@karalabe karalabe force-pushed the dev-noinit-genesis branch from 3d0a11c to 9e22e91 Compare July 21, 2020 12:58
@karalabe
Copy link
Member Author

Merging this as got a confirm from the issue author that the PR fixes the problem. Also it's more or less a trivial change.

@karalabe karalabe merged commit 0b53e48 into ethereum:master Jul 22, 2020
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.

1 participant