aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-25 16:58:46 +0800
committerobscuren <geffobscura@gmail.com>2015-03-25 16:58:46 +0800
commitdda1d605565caad90597fd7d0e5126838cef3e9c (patch)
treeecfcd0b93ad02cb09149d15ddb79dfee7f95cbee
parent3301f6ecef6a31ff0ffc5d6d586cd9b71337a063 (diff)
downloaddexon-dda1d605565caad90597fd7d0e5126838cef3e9c.tar.gz
dexon-dda1d605565caad90597fd7d0e5126838cef3e9c.tar.zst
dexon-dda1d605565caad90597fd7d0e5126838cef3e9c.zip
Store protocol version in the block db **NOT** extra db
-rw-r--r--eth/backend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 3f7f7c2cb..3fa10086a 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -167,13 +167,13 @@ func New(config *Config) (*Ethereum, error) {
extraDb, err := ethdb.NewLDBDatabase(path.Join(config.DataDir, "extra"))
// Perform database sanity checks
- d, _ := extraDb.Get([]byte("ProtocolVersion"))
+ d, _ := blockDb.Get([]byte("ProtocolVersion"))
protov := int(common.NewValue(d).Uint())
if protov != config.ProtocolVersion && protov != 0 {
path := path.Join(config.DataDir, "blockchain")
return nil, fmt.Errorf("Database version mismatch. Protocol(%d / %d). `rm -rf %s`", protov, config.ProtocolVersion, path)
}
- saveProtocolVersion(extraDb, config.ProtocolVersion)
+ saveProtocolVersion(blockDb, config.ProtocolVersion)
servlogger.Infof("Protocol Version: %v, Network Id: %v", config.ProtocolVersion, config.NetworkId)
eth := &Ethereum{