ceremonyclient/vdf/vdf_test.go
2024-06-05 22:48:10 +02:00

18 lines
429 B
Go

package vdf_test
import (
"source.quilibrium.com/quilibrium/cermonyclient/vdf"
"testing"
)
const intSizeBits = uint16(2048)
const difficulty = uint64(10000)
func TestProveVerify(t *testing.T) {
solution := vdf.WesolowskiSolve(intSizeBits, []byte{0x01, 0x02, 0x03}, difficulty)
isOk := vdf.WesolowskiVerify(intSizeBits, []byte{0x01, 0x02, 0x03}, difficulty, solution)
if !isOk {
t.Errorf("WesolowskiVerify failed")
}
}