Browse Source

Merge pull request #50 from ralexstokes/use-clearer-multihash-code

Compare multihash `Code` to `IDENTITY` when extracting public key
pull/1683/head
Steven Allen 5 years ago
committed by GitHub
parent
commit
b4df7c43c4
  1. 2
      core/peer/peer.go

2
core/peer/peer.go

@ -92,7 +92,7 @@ func (id ID) ExtractPublicKey() (ic.PubKey, error) {
if err != nil {
return nil, err
}
if decoded.Code != mh.ID {
if decoded.Code != mh.IDENTITY {
return nil, ErrNoPublicKey
}
pk, err := ic.UnmarshalPublicKey(decoded.Digest)

Loading…
Cancel
Save