I have a test failing in my code (below) and I think it shouldn't. Perhaps I'm missing something though - was wondering if this is a bug, or I have incorrect assumptions somewhere:
func TestPubKey(t *testing.T) {
priv, _, _ := crypto.GenerateEd25519Key(mrand.New(mrand.NewSource(0)))
id1, _ := peer.IDFromEd25519PublicKey(priv.GetPublic())
id2, _ := peer.IDFromPrivateKey(priv)
assert.Equal(t, id1.Pretty(), id2.Pretty(), "should be equal?") // fails...
}
p.s. I found that IDFromPublicKey
works instead of IDFromEd25519PublicKey
but the difference still seems strange...