mirror of
https://github.com/luxfi/verkle.git
synced 2026-10-30 15:13:33 +00:00
* 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]>
25 lines
340 B
Go
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)
|
|
}
|
|
|
|
}
|