aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/state_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 /core/state/state_test.go
parent5dbd8b42a90779bd4269012c1336679fd4ca9824 (diff)
downloadgo-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar
go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.gz
go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.bz2
go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.lz
go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.xz
go-tangerine-7beccb29becf439df7bf4c033a94c019ad25bead.tar.zst
go-tangerine-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 'core/state/state_test.go')
-rw-r--r--core/state/state_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/state/state_test.go b/core/state/state_test.go
index 6d42d63d8..12778f6f1 100644
--- a/core/state/state_test.go
+++ b/core/state/state_test.go
@@ -87,7 +87,7 @@ func (s *StateSuite) TestDump(c *checker.C) {
}
func (s *StateSuite) SetUpTest(c *checker.C) {
- s.db, _ = ethdb.NewMemDatabase()
+ s.db = ethdb.NewMemDatabase()
s.state, _ = New(common.Hash{}, NewDatabase(s.db))
}
@@ -133,8 +133,7 @@ func (s *StateSuite) TestSnapshotEmpty(c *checker.C) {
// use testing instead of checker because checker does not support
// printing/logging in tests (-check.vv does not work)
func TestSnapshot2(t *testing.T) {
- db, _ := ethdb.NewMemDatabase()
- state, _ := New(common.Hash{}, NewDatabase(db))
+ state, _ := New(common.Hash{}, NewDatabase(ethdb.NewMemDatabase()))
stateobjaddr0 := toAddr([]byte("so0"))
stateobjaddr1 := toAddr([]byte("so1"))