aboutsummaryrefslogtreecommitdiffstats
path: root/trie/secure_trie_test.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-05-09 20:24:25 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-09 20:24:25 +0800
commit7beccb29becf439df7bf4c033a94c019ad25bead (patch)
tree5d8581c15f3f110c765c6383e0c4c7724418d6f0 /trie/secure_trie_test.go
parent5dbd8b42a90779bd4269012c1336679fd4ca9824 (diff)
downloaddexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar.gz
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar.bz2
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar.lz
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar.xz
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.tar.zst
dexon-7beccb29becf439df7bf4c033a94c019ad25bead.zip
all: get rid of error when creating memory database (#16716)
* all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
Diffstat (limited to 'trie/secure_trie_test.go')
-rw-r--r--trie/secure_trie_test.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/trie/secure_trie_test.go b/trie/secure_trie_test.go
index aedf5a1cd..d16d99968 100644
--- a/trie/secure_trie_test.go
+++ b/trie/secure_trie_test.go
@@ -28,18 +28,14 @@ import (
)
func newEmptySecure() *SecureTrie {
- diskdb, _ := ethdb.NewMemDatabase()
- triedb := NewDatabase(diskdb)
-
- trie, _ := NewSecure(common.Hash{}, triedb, 0)
+ trie, _ := NewSecure(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()), 0)
return trie
}
// makeTestSecureTrie creates a large enough secure trie for testing.
func makeTestSecureTrie() (*Database, *SecureTrie, map[string][]byte) {
// Create an empty trie
- diskdb, _ := ethdb.NewMemDatabase()
- triedb := NewDatabase(diskdb)
+ triedb := NewDatabase(ethdb.NewMemDatabase())
trie, _ := NewSecure(common.Hash{}, triedb, 0)