mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
Use discover.PubkeyID to generate node id in simulation
This commit is contained in:
parent
4d4a67a9cb
commit
00c7ab9178
1 changed files with 2 additions and 3 deletions
|
|
@ -163,9 +163,8 @@ func RandomNodeConfig() *NodeConfig {
|
|||
if err != nil {
|
||||
panic("unable to generate key")
|
||||
}
|
||||
var id discover.NodeID
|
||||
pubkey := crypto.FromECDSAPub(&key.PublicKey)
|
||||
copy(id[:], pubkey[1:])
|
||||
|
||||
id := discover.PubkeyID(&key.PublicKey)
|
||||
return &NodeConfig{
|
||||
ID: id,
|
||||
PrivateKey: key,
|
||||
|
|
|
|||
Loading…
Reference in a new issue