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

Call OnBlockchainInit before OnGenesisBlock #22

Merged

Conversation

maoueh
Copy link

@maoueh maoueh commented Mar 13, 2024

No description provided.

@@ -470,9 +474,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
}
rawdb.WriteChainConfig(db, genesisHash, chainConfig)
}
if bc.logger != nil && bc.logger.OnBlockchainInit != nil {
Copy link
Owner

Choose a reason for hiding this comment

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

Ah I remember now why I put it there, it's because the initialization is done and chain config has also been written to db at that point. But it does make sense to emit this before genesis block definitely.

Copy link
Owner

@s1na s1na left a comment

Choose a reason for hiding this comment

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

LGTM

@s1na s1na merged commit 817e261 into s1na:extended-tracer-struct Mar 14, 2024
@maoueh maoueh deleted the fix/blockchain-init-first branch April 17, 2024 17:14
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.

2 participants