eth-kzg-ceremony-alt/powersoftau_test.go
powersoftau_test.goRaw
1package kzgceremony
2
3import (
4 "testing"
5
6 qt "github.com/frankban/quicktest"
7)
8
9func TestContribute(t *testing.T) {
10 c := qt.New(t)
11
12 srs_0 := newEmptySRS(10, 10)
13
14 contr_1, err := Contribute(srs_0, []byte("1111111111111111111111111111111111111111111111111111111111111111"))
15 c.Assert(err, qt.IsNil)
16
17 c.Assert(Verify(srs_0, contr_1.SRS, contr_1.Proof), qt.IsTrue)
18
19 contr_2, err := Contribute(contr_1.SRS, []byte("2222222222222222222222222222222222222222222222222222222222222222"))
20 c.Assert(err, qt.IsNil)
21 c.Assert(Verify(contr_1.SRS, contr_2.SRS, contr_2.Proof), qt.IsTrue)
22}