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

@ -977,7 +977,7 @@ func (q *queue) DeliverNodeData(id string, data [][]byte, callback func(error, i
process := []trie.SyncResult{}
for _, blob := range data {
// Skip any state trie entires that were not requested
hash := common.BytesToHash(crypto.Sha3(blob))
hash := common.BytesToHash(crypto.Keccak256(blob))
if _, ok := request.Hashes[hash]; !ok {
errs = append(errs, fmt.Errorf("non-requested state data %x", hash))
continue