Merge pull request #2455 from zsfelfoldi/chaindb

core: improved chain db performance by using sequential keys
This commit is contained in:
Jeffrey Wilcke
2016-06-13 15:16:09 +02:00
committed by GitHub
24 changed files with 841 additions and 361 deletions

View File

@ -806,7 +806,7 @@ func MustMakeChainConfig(ctx *cli.Context) *core.ChainConfig {
// MustMakeChainConfigFromDb reads the chain configuration from the given database.
func MustMakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *core.ChainConfig {
genesis := core.GetBlock(db, core.GetCanonicalHash(db, 0))
genesis := core.GetBlock(db, core.GetCanonicalHash(db, 0), 0)
if genesis != nil {
// Existing genesis block, use stored config if available.