mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
core: use stateless keccak
This commit is contained in:
parent
455331758d
commit
d6d341ea6f
1 changed files with 2 additions and 5 deletions
|
|
@ -141,11 +141,8 @@ func Bloom9(data []byte) []byte {
|
|||
|
||||
// bloomValues returns the bytes (index-value pairs) to set for the given data
|
||||
func bloomValues(data []byte, hashbuf *[6]byte) (uint, byte, uint, byte, uint, byte) {
|
||||
sha := hasherPool.Get().(crypto.KeccakState)
|
||||
sha.Reset()
|
||||
sha.Write(data)
|
||||
sha.Read(hashbuf[:])
|
||||
hasherPool.Put(sha)
|
||||
hash := crypto.Keccak256(data)
|
||||
copy(hashbuf[:], hash[:6])
|
||||
// The actual bits to flip
|
||||
v1 := byte(1 << (hashbuf[1] & 0x7))
|
||||
v2 := byte(1 << (hashbuf[3] & 0x7))
|
||||
|
|
|
|||
Loading…
Reference in a new issue