From e2d1d832efe0623539c9d37ca8aee17d44e47067 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 13:00:25 +0100 Subject: added nil check --- state/state_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'state') 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) { -- cgit v1.2.3