Skip to content

Commit

Permalink
remove now-unsed sszHash function (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-bayardo authored Nov 19, 2022
1 parent 0bb217d commit fa6027f
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions core/types/hashing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ package types

import (
"bytes"
"crypto/sha256"
"sync"

"github.com/protolambda/ztyp/codec"
"github.com/protolambda/ztyp/tree"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
"github.com/protolambda/ztyp/tree"
"golang.org/x/crypto/sha3"
)

Expand Down Expand Up @@ -128,14 +125,3 @@ func DeriveSha(list DerivableList, hasher TrieHasher) common.Hash {
}
return hasher.Hash()
}

// sszHash returns the hash ot the raw serialized ssz-container (i.e. without merkelization)
func sszHash(c codec.Serializable) ([32]byte, error) {
sha := sha256.New()
if err := c.Serialize(codec.NewEncodingWriter(sha)); err != nil {
return [32]byte{}, err
}
var sum [32]byte
copy(sum[:], sha.Sum(nil))
return sum, nil
}

0 comments on commit fa6027f

Please sign in to comment.