good morning!!!!

Skip to content
Snippets Groups Projects
Commit 4300f2a0 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Fixed state tests

parent c28116cb
No related branches found
No related tags found
No related merge requests found
package state package state
import ( import (
"fmt"
"math/big" "math/big"
"testing" "testing"
...@@ -61,23 +60,21 @@ func (s *StateSuite) TestDump(c *checker.C) { ...@@ -61,23 +60,21 @@ func (s *StateSuite) TestDump(c *checker.C) {
func (s *StateSuite) SetUpTest(c *checker.C) { func (s *StateSuite) SetUpTest(c *checker.C) {
db, _ := ethdb.NewMemDatabase() db, _ := ethdb.NewMemDatabase()
s.state = New(nil, db) s.state = New(common.Hash{}, db)
} }
func TestNull(t *testing.T) { func TestNull(t *testing.T) {
db, _ := ethdb.NewMemDatabase() db, _ := ethdb.NewMemDatabase()
state := New(nil, db) state := New(common.Hash{}, db)
address := common.FromHex("0x823140710bf13990e4500136726d8b55") address := common.HexToAddress("0x823140710bf13990e4500136726d8b55")
state.NewStateObject(address) state.NewStateObject(address)
//value := common.FromHex("0x823140710bf13990e4500136726d8b55") //value := common.FromHex("0x823140710bf13990e4500136726d8b55")
value := make([]byte, 16) value := make([]byte, 16)
fmt.Println("test it here", common.NewValue(value)) state.SetState(address, common.Hash{}, value)
state.SetState(address, []byte{0}, value)
state.Update(nil) state.Update(nil)
state.Sync() state.Sync()
value = state.GetState(address, []byte{0}) value = state.GetState(address, common.Hash{})
fmt.Printf("res: %x\n", value)
} }
func (s *StateSuite) TestSnapshot(c *checker.C) { func (s *StateSuite) TestSnapshot(c *checker.C) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment