-
Notifications
You must be signed in to change notification settings - Fork 20.7k
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
core: fix when db empty on startup overrides for TTD and gray glacier do not work #25146
Conversation
@@ -250,6 +250,7 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, override | |||
if err != nil { | |||
return genesis.Config, common.Hash{}, err | |||
} | |||
performConfigOverride(genesis.Config, overrideGrayGlacier, overrideTerminalTotalDifficulty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should clone genesis.Config before overriding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0x62044d2cab405388891ee6d53747817f34c0f00341cde548c0ce9834e9718f27
@@ -322,6 +313,15 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, override | |||
return newcfg, stored, nil | |||
} | |||
|
|||
func performConfigOverride(cfg *params.ChainConfig, overrideGrayGlacier *big.Int, overrideTerminalTotalDifficulty *big.Int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps there is a better place for this function? should I make it a unexported method of Genesis
? Does it need documentation, other private methods don't have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0x62044d2cab405388891ee6d53747817f34c0f00341cde548c0ce9834e9718f27
Thanks, but there's already a PR open to tackle this #25136 |
@karalabe ok, no worries. Is there a specific discord channel to discuss geth contributions, so I can talk about what I am doing before doing it? |
Fixes #25133
My first go-ethereum contribution, but I done some on prysm: https://github.com/prysmaticlabs/prysm/pulls?q=+is%3Apr+author%3Aleolara+
Please, let me know how to improve this PR.