cmd, eth: drop the blockchain version from cli/eth configs

This commit is contained in:
Péter Szilágyi
2016-09-15 14:09:47 +03:00
parent 0f6f83a709
commit 30860491ba
4 changed files with 3 additions and 12 deletions

View File

@ -70,7 +70,6 @@ type Config struct {
Genesis string // Genesis JSON to seed the chain database with
FastSync bool // Enables the state download based fast synchronisation algorithm
BlockChainVersion int
SkipBcVersionCheck bool // e.g. blockchain export
DatabaseCache int
DatabaseHandles int
@ -180,10 +179,10 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
if !config.SkipBcVersionCheck {
bcVersion := core.GetBlockChainVersion(chainDb)
if bcVersion != config.BlockChainVersion && bcVersion != 0 {
return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, config.BlockChainVersion)
if bcVersion != core.BlockChainVersion && bcVersion != 0 {
return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, core.BlockChainVersion)
}
core.WriteBlockChainVersion(chainDb, config.BlockChainVersion)
core.WriteBlockChainVersion(chainDb, core.BlockChainVersion)
}
// load the genesis block or write a new one if no genesis