Use fieldparams for BLS public key (#10042)

* Use fieldparams for pubkey length

* Fix validator tests

* fix more tests

* fix mock validator

* Fix typo

* bunch of typos

* Update bytes.go

* Update BUILD.bazel

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terence tsao
2022-01-06 09:33:08 -08:00
committed by GitHub
parent ad06230291
commit c69bce5d84
133 changed files with 672 additions and 539 deletions

View File

@@ -5,6 +5,7 @@ import (
"io/ioutil"
"testing"
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/testing/require"
"github.com/sirupsen/logrus"
)
@@ -17,7 +18,7 @@ func TestMain(m *testing.M) {
}
// setupDB instantiates and returns a DB instance for the validator client.
func setupDB(t testing.TB, pubkeys [][48]byte) *Store {
func setupDB(t testing.TB, pubkeys [][fieldparams.BLSPubkeyLength]byte) *Store {
db, err := NewKVStore(context.Background(), t.TempDir(), &Config{
PubKeys: pubkeys,
})