• Alex Stokes's avatar
    Compare multihash `Code` to `IDENTITY` when extracting public key · 686c1736
    Alex Stokes authored
    This PR is a non-substantive change with the goal of making this method
    `ExtractPublicKey` from a `peer.ID` clearer to the reader. This goal is
    accomplished by using the full name of the identity hash code `IDENTITY` instead
    of the deprecated `ID` code. This change makes its clearer to the reader that
    there is a trivial way to compute the public key given the digest. Without this
    change it is easy to confuse `ID` with a concept relating to peer IDs (and thus
    implying this function somehow computes a hash pre-image to get the
    corrresponding public key.
    686c1736
peer.go 5.07 KB