Skip to content

Commit 4300f2a

Browse files
committed
Fixed state tests
1 parent c28116c commit 4300f2a

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

‎state/state_test.go‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package state
22

33
import (
4-
"fmt"
54
"math/big"
65
"testing"
76

@@ -61,23 +60,21 @@ func (s *StateSuite) TestDump(c *checker.C) {
6160

6261
func (s *StateSuite) SetUpTest(c *checker.C) {
6362
db, _ := ethdb.NewMemDatabase()
64-
s.state = New(nil, db)
63+
s.state = New(common.Hash{}, db)
6564
}
6665

6766
func TestNull(t *testing.T) {
6867
db, _ := ethdb.NewMemDatabase()
69-
state := New(nil, db)
68+
state := New(common.Hash{}, db)
7069

71-
address := common.FromHex("0x823140710bf13990e4500136726d8b55")
70+
address := common.HexToAddress("0x823140710bf13990e4500136726d8b55")
7271
state.NewStateObject(address)
7372
//value := common.FromHex("0x823140710bf13990e4500136726d8b55")
7473
value := make([]byte, 16)
75-
fmt.Println("test it here", common.NewValue(value))
76-
state.SetState(address, []byte{0}, value)
74+
state.SetState(address, common.Hash{}, value)
7775
state.Update(nil)
7876
state.Sync()
79-
value = state.GetState(address, []byte{0})
80-
fmt.Printf("res: %x\n", value)
77+
value = state.GetState(address, common.Hash{})
8178
}
8279

8380
func (s *StateSuite) TestSnapshot(c *checker.C) {

0 commit comments

Comments
 (0)