diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-02 20:00:25 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-02 20:00:25 +0800 |
commit | e2d1d832efe0623539c9d37ca8aee17d44e47067 (patch) | |
tree | ae681ba7255a293bf3edc02c30da207bae9ac96a /state | |
parent | d336e24dcec2bb2cb89fff76302882aa82124dc8 (diff) | |
download | go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.gz go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.bz2 go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.lz go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.xz go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.tar.zst go-tangerine-e2d1d832efe0623539c9d37ca8aee17d44e47067.zip |
added nil check
Diffstat (limited to 'state')
-rw-r--r-- | state/state_test.go | 9 |
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) { |