Quellcode durchsuchen

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

Péter Szilágyi vor 9 Jahren
Ursprung
Commit
30860491ba
4 geänderte Dateien mit 3 neuen und 12 gelöschten Zeilen
  1. 0 1
      cmd/geth/main.go
  2. 0 1
      cmd/geth/usage.go
  3. 0 6
      cmd/utils/flags.go
  4. 3 4
      eth/backend.go

+ 0 - 1
cmd/geth/main.go

@@ -133,7 +133,6 @@ participating.
 		utils.BootnodesFlag,
 		utils.DataDirFlag,
 		utils.KeyStoreDirFlag,
-		utils.BlockchainVersionFlag,
 		utils.OlympicFlag,
 		utils.FastSyncFlag,
 		utils.CacheFlag,

+ 0 - 1
cmd/geth/usage.go

@@ -74,7 +74,6 @@ var AppHelpFlagGroups = []flagGroup{
 			utils.FastSyncFlag,
 			utils.LightKDFFlag,
 			utils.CacheFlag,
-			utils.BlockchainVersionFlag,
 		},
 	},
 	{

+ 0 - 6
cmd/utils/flags.go

@@ -146,11 +146,6 @@ var (
 		Usage: "Megabytes of memory allocated to internal caching (min 16MB / database forced)",
 		Value: 128,
 	}
-	BlockchainVersionFlag = cli.IntFlag{
-		Name:  "blockchainversion",
-		Usage: "Blockchain version (integer)",
-		Value: core.BlockChainVersion,
-	}
 	FastSyncFlag = cli.BoolFlag{
 		Name:  "fast",
 		Usage: "Enable fast syncing through state downloads",
@@ -681,7 +676,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
 		Etherbase:               MakeEtherbase(stack.AccountManager(), ctx),
 		ChainConfig:             MustMakeChainConfig(ctx),
 		FastSync:                ctx.GlobalBool(FastSyncFlag.Name),
-		BlockChainVersion:       ctx.GlobalInt(BlockchainVersionFlag.Name),
 		DatabaseCache:           ctx.GlobalInt(CacheFlag.Name),
 		DatabaseHandles:         MakeDatabaseHandles(),
 		NetworkId:               ctx.GlobalInt(NetworkIdFlag.Name),

+ 3 - 4
eth/backend.go

@@ -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