mv of babyjub.PublicKey to babyjub.PublicKeyComp

Update usage of `*babyjub.PublicKey` to `babyjub.PublicKeyComp`
- when the key is not defined, internally is used `babyjub.EmptyBJJComp`, which is a `[32]byte` of zeroes of type `babyjub.PublicKeyComp`
- the API continues returning `nil` when the key is not defined
This commit is contained in:
arnaucube
2020-12-18 17:19:07 +01:00
parent b9943182b8
commit 4b10549822
47 changed files with 761 additions and 733 deletions

View File

@@ -214,10 +214,10 @@ func TestParseQueryBJJ(t *testing.T) {
assert.NoError(t, err)
assert.Nil(t, res)
// Correct
c.m[name] = bjjToString(pubK)
c.m[name] = bjjToString(pubK.Compress())
res, err = parseQueryBJJ(c)
assert.NoError(t, err)
assert.Equal(t, *pubK, *res)
assert.Equal(t, pubK.Compress(), *res)
}
func TestParseQueryTxType(t *testing.T) {