all: clean up and proerly abstract database access

This commit is contained in:
Péter Szilágyi
2019-03-06 13:35:03 +02:00
parent 15eee47ebf
commit 054412e335
94 changed files with 1573 additions and 1381 deletions
+4 -1
View File
@@ -51,7 +51,9 @@ func TestNodeIteratorCoverage(t *testing.T) {
t.Errorf("state entry not reported %x", hash)
}
}
for _, key := range db.TrieDB().DiskDB().(*ethdb.MemDatabase).Keys() {
it := db.TrieDB().DiskDB().(ethdb.Database).NewIterator()
for it.Next() {
key := it.Key()
if bytes.HasPrefix(key, []byte("secure-key-")) {
continue
}
@@ -59,4 +61,5 @@ func TestNodeIteratorCoverage(t *testing.T) {
t.Errorf("state entry not reported %x", key)
}
}
it.Release()
}