mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete * 2.1.0 main node rollup
28 lines
324 B
Go
28 lines
324 B
Go
// -*- go -*-
|
|
|
|
package main
|
|
|
|
type FieldElement [10]int32
|
|
|
|
var zero FieldElement
|
|
|
|
func FeZero(fe *FieldElement) {
|
|
copy(fe[:], zero[:])
|
|
}
|
|
|
|
func FeOne(fe *FieldElement) {
|
|
FeZero(fe)
|
|
fe[0] = 1
|
|
fe[1] = 0
|
|
}
|
|
|
|
// @Test 0 0 = 1
|
|
// @Test 1 2 = 4
|
|
func main(a, b int32) int {
|
|
var v FieldElement
|
|
|
|
FeOne(&v)
|
|
|
|
return a + b + v[0]
|
|
}
|