aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-14 02:44:03 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-14 02:44:03 +0800
commitb8ca0a830e89d4d7c4314c13bcbc2629992f43d9 (patch)
treeb7975a1ffc0884bbfeb7523e351f397ec3b67a3e /trie
parenta89cfe92ccdea31891bd7ea0869dac968c04202f (diff)
downloadgo-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar.gz
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar.bz2
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar.lz
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar.xz
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.tar.zst
go-tangerine-b8ca0a830e89d4d7c4314c13bcbc2629992f43d9.zip
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.
Diffstat (limited to 'trie')
-rw-r--r--trie/cache.go4
-rw-r--r--trie/trie.go2
2 files changed, 0 insertions, 6 deletions
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
}
diff --git a/trie/trie.go b/trie/trie.go
index 2970bc185..abf48a850 100644
--- a/trie/trie.go
+++ b/trie/trie.go
@@ -27,8 +27,6 @@ import (
"github.com/ethereum/go-ethereum/crypto"
)
-var StatePre = []byte("state-")
-
func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) {
t2 := New(nil, backend)