aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-02 20:00:25 +0800
committerobscuren <geffobscura@gmail.com>2015-01-02 20:00:25 +0800
commite2d1d832efe0623539c9d37ca8aee17d44e47067 (patch)
treeae681ba7255a293bf3edc02c30da207bae9ac96a /state
parentd336e24dcec2bb2cb89fff76302882aa82124dc8 (diff)
downloadgo-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.gz
go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.zst
go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.zip
added nil check
Diffstat (limited to 'state')
-rw-r--r--state/state_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/state/state_test.go b/state/state_test.go
index 28e4fc5da..1f76eff0f 100644
--- a/state/state_test.go
+++ b/state/state_test.go
@@ -5,7 +5,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil"
- "github.com/ethereum/go-ethereum/trie"
+ "github.com/ethereum/go-ethereum/ptrie"
)
type StateSuite struct {
@@ -18,9 +18,8 @@ var _ = checker.Suite(&StateSuite{})
func (s *StateSuite) TestDump(c *checker.C) {
key := []byte{0x01}
- value := "foo"
- node := []interface{}{key, value}
- s.state.Trie.Put(node)
+ value := []byte("foo")
+ s.state.trie.Update(key, value)
dump := s.state.Dump()
c.Assert(dump, checker.NotNil)
}
@@ -29,7 +28,7 @@ func (s *StateSuite) SetUpTest(c *checker.C) {
db, _ := ethdb.NewMemDatabase()
ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "")
ethutil.Config.Db = db
- s.state = New(trie.New(db, ""))
+ s.state = New(ptrie.New(nil, db))
}
func (s *StateSuite) TestSnapshot(c *checker.C) {