aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-04-17 19:54:23 +0800
committerzelig <viktor.tron@gmail.com>2015-04-20 03:57:50 +0800
commite9874cbcc12f5b15ad91a0df396552afe8c71e3e (patch)
tree6c0f15a3864436a14d4e52bd9067c0611ed02ed8 /common
parent929428d60216f31b2494df1ebf76d9be2a66028c (diff)
downloaddexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar.gz
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar.bz2
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar.lz
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar.xz
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.tar.zst
dexon-e9874cbcc12f5b15ad91a0df396552afe8c71e3e.zip
fixed resolver test
Diffstat (limited to 'common')
-rw-r--r--common/resolver/resolver_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/resolver/resolver_test.go b/common/resolver/resolver_test.go
index 7d570cbc6..a67b9ad04 100644
--- a/common/resolver/resolver_test.go
+++ b/common/resolver/resolver_test.go
@@ -24,12 +24,16 @@ func NewTestBackend() *testBackend {
self.contracts = make(map[string](map[string]string))
self.contracts["0x"+HashRegContractAddress] = make(map[string]string)
- key := storageAddress(1, common.Hex2BytesFixed(codehash, 32))
+ key := storageAddress(storageMapping(storageIdx2Addr(1), common.Hex2BytesFixed(codehash, 32)))
self.contracts["0x"+HashRegContractAddress][key] = "0x" + hash
self.contracts["0x"+URLHintContractAddress] = make(map[string]string)
- key = storageAddress(1, common.Hex2BytesFixed(hash, 32))
+ mapaddr := storageMapping(storageIdx2Addr(1), common.Hex2BytesFixed(hash, 32))
+
+ key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(0)))
self.contracts["0x"+URLHintContractAddress][key] = "0x" + common.Bytes2Hex([]byte(url))
+ key = storageAddress(storageFixedArray(mapaddr, storageIdx2Addr(1)))
+ self.contracts["0x"+URLHintContractAddress][key] = "0x00"
return self
}