diff options
Diffstat (limited to 'common/registrar')
-rw-r--r-- | common/registrar/ethreg/api.go | 2 | ||||
-rw-r--r-- | common/registrar/registrar.go | 4 | ||||
-rw-r--r-- | common/registrar/registrar_test.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/common/registrar/ethreg/api.go b/common/registrar/ethreg/api.go index 1ba422c4d..79a6c2191 100644 --- a/common/registrar/ethreg/api.go +++ b/common/registrar/ethreg/api.go @@ -86,7 +86,7 @@ func (api *PrivateRegistarAPI) Register(sender common.Address, addr common.Addre } codeb := state.GetCode(addr) - codeHash := common.BytesToHash(crypto.Sha3(codeb)) + codeHash := common.BytesToHash(crypto.Keccak256(codeb)) contentHash := common.HexToHash(contentHashHex) _, err = registrar.New(api.be).SetHashToHash(sender, codeHash, contentHash) diff --git a/common/registrar/registrar.go b/common/registrar/registrar.go index 24e45edb3..0606f6985 100644 --- a/common/registrar/registrar.go +++ b/common/registrar/registrar.go @@ -68,7 +68,7 @@ const ( ) func abiSignature(s string) string { - return common.ToHex(crypto.Sha3([]byte(s))[:4]) + return common.ToHex(crypto.Keccak256([]byte(s))[:4]) } var ( @@ -401,7 +401,7 @@ func storageMapping(addr, key []byte) []byte { data := make([]byte, 64) copy(data[0:32], key[0:32]) copy(data[32:64], addr[0:32]) - sha := crypto.Sha3(data) + sha := crypto.Keccak256(data) return sha } diff --git a/common/registrar/registrar_test.go b/common/registrar/registrar_test.go index 68ee65ab4..b2287803c 100644 --- a/common/registrar/registrar_test.go +++ b/common/registrar/registrar_test.go @@ -31,7 +31,7 @@ type testBackend struct { var ( text = "test" codehash = common.StringToHash("1234") - hash = common.BytesToHash(crypto.Sha3([]byte(text))) + hash = common.BytesToHash(crypto.Keccak256([]byte(text))) url = "bzz://bzzhash/my/path/contr.act" ) |