You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
581 B

  1. package kzgceremony
  2. import (
  3. "testing"
  4. qt "github.com/frankban/quicktest"
  5. )
  6. func TestContribute(t *testing.T) {
  7. c := qt.New(t)
  8. srs_0 := newEmptySRS(10, 10)
  9. contr_1, err := Contribute(srs_0, []byte("1111111111111111111111111111111111111111111111111111111111111111"))
  10. c.Assert(err, qt.IsNil)
  11. c.Assert(Verify(srs_0, contr_1.SRS, contr_1.Proof), qt.IsTrue)
  12. contr_2, err := Contribute(contr_1.SRS, []byte("2222222222222222222222222222222222222222222222222222222222222222"))
  13. c.Assert(err, qt.IsNil)
  14. c.Assert(Verify(contr_1.SRS, contr_2.SRS, contr_2.Proof), qt.IsTrue)
  15. }