aboutsummaryrefslogtreecommitdiffstats
path: root/state/managed_state_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-22 01:18:19 +0800
committerobscuren <geffobscura@gmail.com>2015-03-22 01:18:19 +0800
commit7f85608f30a2e34005c8d15566849229c758c2f1 (patch)
tree7aeb9d8bdfda7ec10ea38688a96ed245028764ad /state/managed_state_test.go
parent09766d1729f7530093aec7e9acd3e5339b2c2028 (diff)
parentfcacfabe1959c4aff6a63cb4e275f65328660601 (diff)
downloaddexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.gz
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.bz2
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.lz
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.xz
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.tar.zst
dexon-7f85608f30a2e34005c8d15566849229c758c2f1.zip
Merge branch 'conversion' into develop
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)