Merge pull request #2242 from jimenezrick/upstream-crypto

Closes #2241: Use Keccak-256 from golang.org/x/crypto/sha3 and mention explicitly
This commit is contained in:
Jeffrey Wilcke
2016-02-24 12:57:57 +01:00
68 changed files with 925 additions and 633 deletions

View File

@ -63,7 +63,7 @@ func TestSecureGetKey(t *testing.T) {
key := []byte("foo")
value := []byte("bar")
seckey := crypto.Sha3(key)
seckey := crypto.Keccak256(key)
if !bytes.Equal(trie.Get(key), value) {
t.Errorf("Get did not return bar")

View File

@ -40,7 +40,7 @@ var (
emptyRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")
// This is the known hash of an empty state trie entry.
emptyState = crypto.Sha3Hash(nil)
emptyState = crypto.Keccak256Hash(nil)
)
// ClearGlobalCache clears the global trie cache