Skip to content

Commit

Permalink
Use deterministic validator keys by default in ChainBuilder so tests …
Browse files Browse the repository at this point in the history
…are more predictable. (#2666)
  • Loading branch information
ajsutton authored Aug 27, 2020
1 parent 052a217 commit 1de12bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.stream.LongStream;
import java.util.stream.Stream;
import org.apache.tuweni.bytes.Bytes32;
import tech.pegasys.teku.bls.BLSKeyGenerator;
import tech.pegasys.teku.bls.BLSKeyPair;
import tech.pegasys.teku.bls.BLSSignature;
import tech.pegasys.teku.core.lookup.BlockProvider;
Expand All @@ -50,6 +49,7 @@
import tech.pegasys.teku.datastructures.util.DepositGenerator;
import tech.pegasys.teku.datastructures.util.MockStartBeaconStateGenerator;
import tech.pegasys.teku.datastructures.util.MockStartDepositGenerator;
import tech.pegasys.teku.datastructures.util.MockStartValidatorKeyPairFactory;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
import tech.pegasys.teku.ssz.SSZTypes.SSZList;
Expand All @@ -59,7 +59,7 @@
/** A utility for building small, valid chains of blocks with states for testing */
public class ChainBuilder {
private static final List<BLSKeyPair> DEFAULT_VALIDATOR_KEYS =
BLSKeyGenerator.generateKeyPairs(3);
new MockStartValidatorKeyPairFactory().generateKeyPairs(0, 3);

private final List<BLSKeyPair> validatorKeys;
private final AttestationGenerator attestationGenerator;
Expand Down

0 comments on commit 1de12bf

Please sign in to comment.