Skip to content

Commit

Permalink
Merge pull request ethereum#22803 from karalabe/silence-scary-warning
Browse files Browse the repository at this point in the history
eth: don't print db upgrade warning on db init
  • Loading branch information
karalabe authored May 4, 2021
2 parents fc1c1cb + 856c379 commit 640d2c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
if bcVersion != nil && *bcVersion > core.BlockChainVersion {
return nil, fmt.Errorf("database version is v%d, Geth %s only supports v%d", *bcVersion, params.VersionWithMeta, core.BlockChainVersion)
} else if bcVersion == nil || *bcVersion < core.BlockChainVersion {
log.Warn("Upgrade blockchain database version", "from", dbVer, "to", core.BlockChainVersion)
if bcVersion != nil { // only print warning on upgrade, not on init
log.Warn("Upgrade blockchain database version", "from", dbVer, "to", core.BlockChainVersion)
}
rawdb.WriteDatabaseVersion(chainDb, core.BlockChainVersion)
}
}
Expand Down

0 comments on commit 640d2c5

Please sign in to comment.