aboutsummaryrefslogtreecommitdiffstats
path: root/state/managed_state_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-17 00:09:08 +0800
committerobscuren <geffobscura@gmail.com>2015-03-17 00:09:08 +0800
commite620bde405161771ea7ecd1cee8641eb9265465e (patch)
treef41b8f98215a2db7aa59e11ce107724b978f759d /state/managed_state_test.go
parent76f215b0feca1fc56890fe5f9ec1acbed79cb701 (diff)
downloadgo-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.gz
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.bz2
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.lz
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.xz
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.tar.zst
go-tangerine-e620bde405161771ea7ecd1cee8641eb9265465e.zip
conversion state
Diffstat (limited to 'state/managed_state_test.go')
-rw-r--r--state/managed_state_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/state/managed_state_test.go b/state/managed_state_test.go
index 4aad1e1e3..b61f59e6d 100644
--- a/state/managed_state_test.go
+++ b/state/managed_state_test.go
@@ -6,15 +6,15 @@ import (
"github.com/ethereum/go-ethereum/common"
)
-var addr = common.Address([]byte("test"))
+var addr = common.BytesToAddress([]byte("test"))
func create() (*ManagedState, *account) {
ms := ManageState(&StateDB{stateObjects: make(map[string]*StateObject)})
so := &StateObject{address: addr, nonce: 100}
- ms.StateDB.stateObjects[string(addr)] = so
- ms.accounts[string(addr)] = newAccount(so)
+ ms.StateDB.stateObjects[addr.Str()] = so
+ ms.accounts[addr.Str()] = newAccount(so)
- return ms, ms.accounts[string(addr)]
+ return ms, ms.accounts[addr.Str()]
}
func TestNewNonce(t *testing.T) {
@@ -73,7 +73,7 @@ func TestRemoteNonceChange(t *testing.T) {
account.nonces = append(account.nonces, nn...)
nonce := ms.NewNonce(addr)
- ms.StateDB.stateObjects[string(addr)].nonce = 200
+ ms.StateDB.stateObjects[addr.Str()].nonce = 200
nonce = ms.NewNonce(addr)
if nonce != 200 {
t.Error("expected nonce after remote update to be", 201, "got", nonce)
@@ -81,7 +81,7 @@ func TestRemoteNonceChange(t *testing.T) {
ms.NewNonce(addr)
ms.NewNonce(addr)
ms.NewNonce(addr)
- ms.StateDB.stateObjects[string(addr)].nonce = 200
+ ms.StateDB.stateObjects[addr.Str()].nonce = 200
nonce = ms.NewNonce(addr)
if nonce != 204 {
t.Error("expected nonce after remote update to be", 201, "got", nonce)