accounts, p2p, rpc: make CGO_ENABLED=0 build again (#19593)
* p2p: remove direct import of cgo-library * accounts, rpc: more nocgo alternatives * rpc: move unix path constant into separate file * accounts/scwallet: address review concerns, remove copy-pasta
This commit is contained in:
committed by
Péter Szilágyi
parent
9efc1a847e
commit
fec3b56f7f
@ -25,7 +25,6 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common/math"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/secp256k1"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
)
|
||||
|
||||
@ -64,7 +63,7 @@ func (e encPubkey) id() enode.ID {
|
||||
// recoverNodeKey computes the public key used to sign the
|
||||
// given hash from the signature.
|
||||
func recoverNodeKey(hash, sig []byte) (key encPubkey, err error) {
|
||||
pubkey, err := secp256k1.RecoverPubkey(hash, sig)
|
||||
pubkey, err := crypto.Ecrecover(hash, sig)
|
||||
if err != nil {
|
||||
return key, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user