Skip to content

Commit

Permalink
fixed resolver test
Browse files Browse the repository at this point in the history
  • Loading branch information
zsfelfoldi committed Apr 17, 2015
1 parent f83e782 commit 6ef4758
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6ef4758

Please sign in to comment.