aboutsummaryrefslogtreecommitdiffstats
path: root/state/state_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'state/state_test.go')
-rw-r--r--state/state_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/state/state_test.go b/state/state_test.go
index 3ecc03ae0..3a1ea225d 100644
--- a/state/state_test.go
+++ b/state/state_test.go
@@ -1,12 +1,14 @@
package state
import (
+ "fmt"
"math/big"
+ "testing"
checker "gopkg.in/check.v1"
- "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/ethdb"
)
type StateSuite struct {
@@ -61,6 +63,22 @@ func (s *StateSuite) SetUpTest(c *checker.C) {
s.state = New(nil, db)
}
+func TestNull(t *testing.T) {
+ db, _ := ethdb.NewMemDatabase()
+ state := New(nil, db)
+
+ address := common.FromHex("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.Update(nil)
+ state.Sync()
+ value = state.GetState(address, []byte{0})
+ fmt.Printf("res: %x\n", value)
+}
+
func (s *StateSuite) TestSnapshot(c *checker.C) {
stateobjaddr := []byte("aa")
storageaddr := common.Big("0")