added comment

This commit is contained in:
decanus 2019-08-11 18:25:44 +02:00
parent 01e7ad18db
commit 5c7f0ad55b
No known key found for this signature in database
GPG Key ID: E95B8C69228FF5B4
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"github.com/vacp2p/mvds/state"
)
// PublicKeyToPeerID turns an ECDSA Public Key to an mvds PeerID.
func PublicKeyToPeerID(k ecdsa.PublicKey) state.PeerID {
var p state.PeerID
copy(p[:], crypto.FromECDSAPub(&k))