mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
signer: use golang/x keccak
This commit is contained in:
parent
d70a98d4b4
commit
c4f238cd92
1 changed files with 2 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"golang.org/x/crypto/sha3"
|
||||||
"math/big"
|
"math/big"
|
||||||
"mime"
|
"mime"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
@ -37,7 +38,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
"github.com/ethereum/go-ethereum/crypto/sha3"
|
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/ethereum/go-ethereum/rlp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -266,7 +266,7 @@ func SignCliqueHeader(header *types.Header) (hexutil.Bytes, error) {
|
||||||
if len(header.Extra) < 65 {
|
if len(header.Extra) < 65 {
|
||||||
return hash.Bytes(), fmt.Errorf("clique header extradata too short, %d < 65", len(header.Extra))
|
return hash.Bytes(), fmt.Errorf("clique header extradata too short, %d < 65", len(header.Extra))
|
||||||
}
|
}
|
||||||
hasher := sha3.NewKeccak256()
|
hasher := sha3.NewLegacyKeccak256()
|
||||||
rlp.Encode(hasher, []interface{}{
|
rlp.Encode(hasher, []interface{}{
|
||||||
header.ParentHash,
|
header.ParentHash,
|
||||||
header.UncleHash,
|
header.UncleHash,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue