From e1211c8953098ae496521567ed601e2976b808e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Tue, 18 Nov 2025 11:33:23 +0100 Subject: [PATCH] consensus: use standard keccak API --- consensus/clique/clique.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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