mirror of
https://github.com/logos-messaging/go-zerokit-rln.git
synced 2026-01-04 22:23:09 +00:00
Remove comments
This commit is contained in:
parent
05d1bf1dc8
commit
41450e5e4f
@ -477,7 +477,7 @@ func (s *RLNSuite) TestGenerateRLNProofWithWitness_VerifiesNOK() {
|
||||
s.NoError(err)
|
||||
s.False(verified3)
|
||||
|
||||
// 4) Membership does not match the index (and nor part of tree), does not verify
|
||||
// 4) Membership does not match the index (and not part of tree), does not verify
|
||||
merkleProof4, err := rln.GetMerkleProof(memberIndex)
|
||||
s.NoError(err)
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package rln
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
@ -31,22 +30,15 @@ func TestMerkleProofSerDe(t *testing.T) {
|
||||
ser := mProof.serialize()
|
||||
require.Equal(t, 8+testSize*32+testSize+8, len(ser))
|
||||
|
||||
fmt.Println("path:", mProof.PathElements)
|
||||
fmt.Println("Serialized: ", ser)
|
||||
|
||||
// Deserialize and check its matches the original
|
||||
desProof := MerkleProof{}
|
||||
err := desProof.deserialize(ser)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, mProof, desProof)
|
||||
}
|
||||
|
||||
// TODO test for errors. eg different size.
|
||||
}
|
||||
|
||||
func TestRLNWitnessInputSerDe(t *testing.T) {
|
||||
// TODO: Is data size arbitrary? or fixed to 32. How its decode in zerokit seems to be fixed to 32.
|
||||
// At least in the proof with custom witness function.
|
||||
depth := 20
|
||||
|
||||
mProof := MerkleProof{
|
||||
@ -69,8 +61,4 @@ func TestRLNWitnessInputSerDe(t *testing.T) {
|
||||
|
||||
ser := witness.serialize()
|
||||
require.Equal(t, 32+8+depth*32+depth+8+32+32+32, len(ser))
|
||||
|
||||
// TODO:
|
||||
//desWitness := RLNWitnessInput{}
|
||||
//err := desWitness.deserialize(ser)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user