Skip to content

Commit

Permalink
Merge pull request #50 from ralexstokes/use-clearer-multihash-code
Browse files Browse the repository at this point in the history
Compare multihash `Code` to `IDENTITY` when extracting public key
  • Loading branch information
Stebalien committed Aug 14, 2019
2 parents 9d9ab90 + e0f4801 commit b4df7c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4df7c4

Please sign in to comment.