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

@@ -58,7 +58,7 @@ func TestParseBlockchainTxs(t *testing.T) {
parser := newParser(strings.NewReader(s))
instructions, err := parser.parse()
require.Nil(t, err)
require.NoError(t, err)
assert.Equal(t, 25, len(instructions.instructions))
assert.Equal(t, 7, len(instructions.users))
@@ -92,7 +92,7 @@ func TestParsePoolTxs(t *testing.T) {
parser := newParser(strings.NewReader(s))
instructions, err := parser.parse()
require.Nil(t, err)
require.NoError(t, err)
assert.Equal(t, 5, len(instructions.instructions))
assert.Equal(t, 4, len(instructions.users))
@@ -151,7 +151,7 @@ func TestParseErrors(t *testing.T) {
`
parser = newParser(strings.NewReader(s))
_, err = parser.parse()
assert.Nil(t, err)
assert.NoError(t, err)
s = `
Type: Blockchain
Transfer(1) A-B: 10 (256)