Update config.go to fix BLS issue (#2821)

* Update config.go

* fix test
This commit is contained in:
Preston Van Loon 2019-06-18 18:02:01 -04:00 committed by GitHub
parent df84615496
commit cebefde335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func genesisState(validators uint64) (*pbp2p.BeaconState, error) {
genesisTime := time.Unix(0, 0).Unix()
deposits := make([]*pbp2p.Deposit, validators)
for i := 0; i < len(deposits); i++ {
var pubKey [96]byte
var pubKey [48]byte
copy(pubKey[:], []byte(strconv.Itoa(i)))
depositInput := &pbp2p.DepositInput{
Pubkey: pubKey[:],
@ -219,6 +219,9 @@ func TestCommitteeAssignment_OK(t *testing.T) {
if err != nil {
t.Fatalf("Could not call epoch committee assignment %v", err)
}
if len(res.Assignment) == 0 {
t.Fatal("No assignments returned")
}
if res.Assignment[0].Shard >= params.BeaconConfig().ShardCount {
t.Errorf("Assigned shard %d can't be higher than %d",
res.Assignment[0].Shard, params.BeaconConfig().ShardCount)

View File

@ -118,7 +118,7 @@ var defaultBeaconConfig = &BeaconChainConfig{
MaxExitDequeuesPerEpoch: 4,
ValidatorPrivkeyFileName: "/validatorprivatekey",
WithdrawalPrivkeyFileName: "/shardwithdrawalkey",
BLSPubkeyLength: 96,
BLSPubkeyLength: 48,
DefaultBufferSize: 10000,
HashCacheSize: 100000,