1 Commits
v0.0.4 ... main

Author SHA1 Message Date
arnaucube
9a5be110fc Updt Sequencer errormsg on try_contr on 200ok code 2023-01-14 23:31:21 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -138,7 +138,7 @@ func newEmptySRS(nG1, nG2 int) *SRS {
} }
func tau(round int, randomness []byte) *toxicWaste { func tau(round int, randomness []byte) *toxicWaste {
val := blake2b.Sum256(randomness) val := blake2b.Sum256(append(randomness, byte(round)))
tau := new(big.Int).Mod( tau := new(big.Int).Mod(
new(big.Int).SetBytes(val[:]), new(big.Int).SetBytes(val[:]),
g2.Q()) g2.Q())

View File

@@ -57,6 +57,11 @@ func TestBatchContribution(t *testing.T) {
bc.Contribute([]byte("1111111111111111111111111111111111111111111111111111111111111111")) bc.Contribute([]byte("1111111111111111111111111111111111111111111111111111111111111111"))
c.Assert(err, qt.IsNil) c.Assert(err, qt.IsNil)
c.Assert(len(nb.Contributions), qt.Equals, 4)
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[1].PotPubKey), qt.IsFalse)
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[2].PotPubKey), qt.IsFalse)
c.Assert(g2.Equal(nb.Contributions[0].PotPubKey, nb.Contributions[3].PotPubKey), qt.IsFalse)
_, err = json.Marshal(nb) _, err = json.Marshal(nb)
c.Assert(err, qt.IsNil) c.Assert(err, qt.IsNil)
} }