Search in sources :

Example 1 with ValidatorKeys

use of tech.pegasys.teku.test.acceptance.dsl.tools.deposits.ValidatorKeys in project teku by ConsenSys.

the class GenesisStateAcceptanceTest method shouldCreateGenesisFromPartialDeposits.

@Test
public void shouldCreateGenesisFromPartialDeposits() throws Exception {
    final BesuNode eth1Node = createBesuNode();
    eth1Node.start();
    int numberOfValidators = 4;
    final TekuDepositSender depositSender = createTekuDepositSender(Config.DEFAULT_NETWORK_NAME);
    final List<ValidatorKeys> validatorKeys = depositSender.generateValidatorKeys(numberOfValidators);
    depositSender.sendValidatorDeposits(eth1Node, validatorKeys, depositSender.getMinDepositAmount());
    depositSender.sendValidatorDeposits(eth1Node, validatorKeys, depositSender.getMaxEffectiveBalance().minus(depositSender.getMinDepositAmount()));
    final TekuNode teku = createTekuNode(config -> config.withDepositsFrom(eth1Node));
    teku.start();
    teku.waitForGenesis();
    teku.waitForValidators(numberOfValidators);
}
Also used : BesuNode(tech.pegasys.teku.test.acceptance.dsl.BesuNode) ValidatorKeys(tech.pegasys.teku.test.acceptance.dsl.tools.deposits.ValidatorKeys) TekuNode(tech.pegasys.teku.test.acceptance.dsl.TekuNode) TekuDepositSender(tech.pegasys.teku.test.acceptance.dsl.TekuDepositSender) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 BesuNode (tech.pegasys.teku.test.acceptance.dsl.BesuNode)1 TekuDepositSender (tech.pegasys.teku.test.acceptance.dsl.TekuDepositSender)1 TekuNode (tech.pegasys.teku.test.acceptance.dsl.TekuNode)1 ValidatorKeys (tech.pegasys.teku.test.acceptance.dsl.tools.deposits.ValidatorKeys)1