From b8ca0a830e89d4d7c4314c13bcbc2629992f43d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Thu, 13 Aug 2015 20:44:03 +0200 Subject: eth, trie: removed key prefixing from state entries & merge db fix Fixed database merge strategy to use the correct database. Due to a copy paste fail when doing type evaluation the same database was being iterated (chain), all others were ignored. Removed state prefixing because {H(code): code} is stored in the same database as the rest of the state. --- trie/cache.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'trie/cache.go') diff --git a/trie/cache.go b/trie/cache.go index 99d8033a6..e475fc861 100644 --- a/trie/cache.go +++ b/trie/cache.go @@ -38,8 +38,6 @@ func NewCache(backend Backend) *Cache { } func (self *Cache) Get(key []byte) []byte { - key = append(StatePre, key...) - data := self.store[string(key)] if data == nil { data, _ = self.backend.Get(key) @@ -49,8 +47,6 @@ func (self *Cache) Get(key []byte) []byte { } func (self *Cache) Put(key []byte, data []byte) { - key = append(StatePre, key...) - self.batch.Put(key, data) self.store[string(key)] = data } -- cgit v1.2.3