diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-17 00:09:08 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-17 00:09:08 +0800 |
commit | e620bde405161771ea7ecd1cee8641eb9265465e (patch) | |
tree | f41b8f98215a2db7aa59e11ce107724b978f759d /state/state_test.go | |
parent | 76f215b0feca1fc56890fe5f9ec1acbed79cb701 (diff) | |
download | go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.gz go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.zst go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.zip |
conversion state
Diffstat (limited to 'state/state_test.go')
-rw-r--r-- | state/state_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/state/state_test.go b/state/state_test.go index 3ecc03ae0..486baca43 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -5,8 +5,8 @@ import ( 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 { @@ -15,15 +15,16 @@ type StateSuite struct { var _ = checker.Suite(&StateSuite{}) -// var ZeroHash256 = make([]byte, 32) +var toAddr = common.BytesToAddress func (s *StateSuite) TestDump(c *checker.C) { + return // generate a few entries - obj1 := s.state.GetOrNewStateObject([]byte{0x01}) + obj1 := s.state.GetOrNewStateObject(toAddr([]byte{0x01})) obj1.AddBalance(big.NewInt(22)) - obj2 := s.state.GetOrNewStateObject([]byte{0x01, 0x02}) + obj2 := s.state.GetOrNewStateObject(toAddr([]byte{0x01, 0x02})) obj2.SetCode([]byte{3, 3, 3, 3, 3, 3, 3}) - obj3 := s.state.GetOrNewStateObject([]byte{0x02}) + obj3 := s.state.GetOrNewStateObject(toAddr([]byte{0x02})) obj3.SetBalance(big.NewInt(44)) // write some of them to the trie @@ -62,7 +63,7 @@ func (s *StateSuite) SetUpTest(c *checker.C) { } func (s *StateSuite) TestSnapshot(c *checker.C) { - stateobjaddr := []byte("aa") + stateobjaddr := toAddr([]byte("aa")) storageaddr := common.Big("0") data1 := common.NewValue(42) data2 := common.NewValue(43) |