mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 19:36:44 +01:00
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:
@@ -40,16 +40,16 @@ func TestTxIDMarshalers(t *testing.T) {
|
||||
h := []byte("0x00000000000001e240004700")
|
||||
var txid TxID
|
||||
err := txid.UnmarshalText(h)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, h, []byte(txid.String()))
|
||||
|
||||
h2, err := txid.MarshalText()
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, h, h2)
|
||||
|
||||
var txid2 TxID
|
||||
err = txid2.UnmarshalText(h2)
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, h2, []byte(txid2.String()))
|
||||
assert.Equal(t, h, h2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user