diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-21 21:47:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-21 21:47:50 +0800 |
commit | 4300f2a0fae793ff73ea861dfe3f90ce97f5af40 (patch) | |
tree | eebdc8409037e152547d86e67300305dda57bf57 | |
parent | c28116cb3b485f01aba852fdc9559a2495db6654 (diff) | |
download | dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar.gz dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar.bz2 dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar.lz dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar.xz dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.tar.zst dexon-4300f2a0fae793ff73ea861dfe3f90ce97f5af40.zip |
Fixed state tests
-rw-r--r-- | state/state_test.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/state/state_test.go b/state/state_test.go index b6e22f891..a3d3973de 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -1,7 +1,6 @@ package state import ( - "fmt" "math/big" "testing" @@ -61,23 +60,21 @@ func (s *StateSuite) TestDump(c *checker.C) { func (s *StateSuite) SetUpTest(c *checker.C) { db, _ := ethdb.NewMemDatabase() - s.state = New(nil, db) + s.state = New(common.Hash{}, db) } func TestNull(t *testing.T) { db, _ := ethdb.NewMemDatabase() - state := New(nil, db) + state := New(common.Hash{}, db) - address := common.FromHex("0x823140710bf13990e4500136726d8b55") + address := common.HexToAddress("0x823140710bf13990e4500136726d8b55") state.NewStateObject(address) //value := common.FromHex("0x823140710bf13990e4500136726d8b55") value := make([]byte, 16) - fmt.Println("test it here", common.NewValue(value)) - state.SetState(address, []byte{0}, value) + state.SetState(address, common.Hash{}, value) state.Update(nil) state.Sync() - value = state.GetState(address, []byte{0}) - fmt.Printf("res: %x\n", value) + value = state.GetState(address, common.Hash{}) } func (s *StateSuite) TestSnapshot(c *checker.C) { |