eth: don't print db upgrade warning on db init
This commit is contained in:
parent
fc1c1cbea9
commit
856c379626
@ -165,7 +165,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
|||||||
if bcVersion != nil && *bcVersion > core.BlockChainVersion {
|
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)
|
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 {
|
} 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)
|
rawdb.WriteDatabaseVersion(chainDb, core.BlockChainVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user