aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/abi_test.go
diff options
context:
space:
mode:
authorRicardo Catalinas Jiménez <r@untroubled.be>2016-02-22 02:40:27 +0800
committerRicardo Catalinas Jiménez <r@untroubled.be>2016-02-22 06:34:34 +0800
commit436fc8d76a4871d67a61dc86c1a635e20594a0e6 (patch)
tree5fad9f69b068f43ca606e2887f5522188e7f9ddd /accounts/abi/abi_test.go
parentc20d6e5e4ed8eff6d26cd849f90ca42dd5a7040c (diff)
downloaddexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar.gz
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar.bz2
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar.lz
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar.xz
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.tar.zst
dexon-436fc8d76a4871d67a61dc86c1a635e20594a0e6.zip
all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()
As we aren't really using the standarized SHA-3
Diffstat (limited to 'accounts/abi/abi_test.go')
-rw-r--r--accounts/abi/abi_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/abi/abi_test.go b/accounts/abi/abi_test.go
index c6a8705cd..d1b8330e3 100644
--- a/accounts/abi/abi_test.go
+++ b/accounts/abi/abi_test.go
@@ -244,7 +244,7 @@ func TestMethodSignature(t *testing.T) {
t.Error("signature mismatch", exp, "!=", m.Sig())
}
- idexp := crypto.Sha3([]byte(exp))[:4]
+ idexp := crypto.Keccak256([]byte(exp))[:4]
if !bytes.Equal(m.Id(), idexp) {
t.Errorf("expected ids to match %x != %x", m.Id(), idexp)
}
@@ -264,7 +264,7 @@ func TestPack(t *testing.T) {
t.FailNow()
}
- sig := crypto.Sha3([]byte("foo(uint32)"))[:4]
+ sig := crypto.Keccak256([]byte("foo(uint32)"))[:4]
sig = append(sig, make([]byte, 32)...)
sig[35] = 10
@@ -286,7 +286,7 @@ func TestMultiPack(t *testing.T) {
t.FailNow()
}
- sig := crypto.Sha3([]byte("bar(uint32,uint16)"))[:4]
+ sig := crypto.Keccak256([]byte("bar(uint32,uint16)"))[:4]
sig = append(sig, make([]byte, 64)...)
sig[35] = 10
sig[67] = 11
@@ -309,7 +309,7 @@ func TestPackSlice(t *testing.T) {
t.FailNow()
}
- sig := crypto.Sha3([]byte("slice(uint32[2])"))[:4]
+ sig := crypto.Keccak256([]byte("slice(uint32[2])"))[:4]
sig = append(sig, make([]byte, 64)...)
sig[35] = 1
sig[67] = 2
@@ -332,7 +332,7 @@ func TestPackSliceBig(t *testing.T) {
t.FailNow()
}
- sig := crypto.Sha3([]byte("slice256(uint256[2])"))[:4]
+ sig := crypto.Keccak256([]byte("slice256(uint256[2])"))[:4]
sig = append(sig, make([]byte, 64)...)
sig[35] = 1
sig[67] = 2