Files
verkle/ipa_test.go
Ignacio HagopianandGitHub 96dc7634f6 Remove needing a file persisting precomputed tables (#369)
* config: use tentative go-ipa

Signed-off-by: Ignacio Hagopian <[email protected]>

* remove precomp references in ci and readme

Signed-off-by: Ignacio Hagopian <[email protected]>

* config: use sync once to be safe during cold start

Signed-off-by: Ignacio Hagopian <[email protected]>

* tests: paralellize tests and bugfix

Signed-off-by: Ignacio Hagopian <[email protected]>

* mod: use tenative go-ipa version

Signed-off-by: Ignacio Hagopian <[email protected]>

* ci: only remove the precomp deletion

Signed-off-by: Ignacio Hagopian <[email protected]>

* rebase

Signed-off-by: Ignacio Hagopian <[email protected]>

* update to go-ipa master

Signed-off-by: Ignacio Hagopian <[email protected]>

---------

Signed-off-by: Ignacio Hagopian <[email protected]>
2023-08-28 13:40:23 +02:00

25 lines
340 B
Go

package verkle
import (
"encoding/binary"
"math/big"
"testing"
)
func TestFromBytes(t *testing.T) {
t.Parallel()
var fr Fr
var beFortyTwo [8]byte
binary.BigEndian.PutUint64(beFortyTwo[:], 42)
FromBytes(&fr, beFortyTwo[:])
bi := big.NewInt(0)
if fr.ToBigIntRegular(bi).Int64() != 42 {
t.Fatalf("got %v, want 42", bi)
}
}