aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-12-11 08:33:45 +0800
committerFelix Lange <fjl@twurst.com>2015-12-18 19:09:10 +0800
commite6fb69296e647ff305e5d9df059e5aa956303538 (patch)
tree4af2d5237abf01ebe7ab35825266775aa7f76400 /eth/backend.go
parent1b89bd5d269d2d85a7c72067e18212135d8757f9 (diff)
downloaddexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar.gz
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar.bz2
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar.lz
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar.xz
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.tar.zst
dexon-e6fb69296e647ff305e5d9df059e5aa956303538.zip
common: remove old RLP implementation, Value and ExtPackage
In order to make this happen, kill all remaining trivial uses of common/{rlp,value}.go. The non-trivial ones have been updated earlier.
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/eth/backend.go b/eth/backend.go
index d51446d51..abd1214ca 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -180,12 +180,11 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
}
if !config.SkipBcVersionCheck {
- b, _ := chainDb.Get([]byte("BlockchainVersion"))
- bcVersion := int(common.NewValue(b).Uint())
+ 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)
}
- saveBlockchainVersion(chainDb, config.BlockChainVersion)
+ core.WriteBlockChainVersion(chainDb, config.BlockChainVersion)
}
glog.V(logger.Info).Infof("Blockchain DB Version: %d", config.BlockChainVersion)
@@ -479,15 +478,6 @@ func dagFiles(epoch uint64) (string, string) {
return dag, "full-R" + dag
}
-func saveBlockchainVersion(db ethdb.Database, bcVersion int) {
- d, _ := db.Get([]byte("BlockchainVersion"))
- blockchainVersion := common.NewValue(d).Uint()
-
- if blockchainVersion == 0 {
- db.Put([]byte("BlockchainVersion"), common.NewValue(bcVersion).Bytes())
- }
-}
-
// upgradeChainDatabase ensures that the chain database stores block split into
// separate header and body entries.
func upgradeChainDatabase(db ethdb.Database) error {