diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index b593d2117d..e9a48316fd 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -42,7 +42,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" - "golang.org/x/crypto/sha3" ) const ( @@ -641,11 +640,9 @@ func (c *Clique) Close() error { } // SealHash returns the hash of a block prior to it being sealed. -func SealHash(header *types.Header) (hash common.Hash) { - hasher := sha3.NewLegacyKeccak256() - encodeSigHeader(hasher, header) - hasher.(crypto.KeccakState).Read(hash[:]) - return hash +func SealHash(header *types.Header) common.Hash { + encoded := CliqueRLP(header) + return crypto.Keccak256Hash(encoded) } // CliqueRLP returns the rlp bytes which needs to be signed for the proof-of-authority