use of tech.pegasys.teku.test.acceptance.dsl.tools.GenesisStateConfig in project teku by ConsenSys.
the class TekuNode method create.
public static TekuNode create(final Network network, final DockerVersion version, final Consumer<Config> configOptions, final GenesisStateGenerator genesisStateGenerator) throws TimeoutException, IOException {
final Config config = new Config();
configOptions.accept(config);
final TekuNode node = new TekuNode(network, version, config);
if (config.getGenesisStateConfig().isPresent()) {
final GenesisStateConfig genesisConfig = config.getGenesisStateConfig().get();
File genesisFile = genesisStateGenerator.generateState(genesisConfig);
node.copyFileToContainer(genesisFile, genesisConfig.getPath());
}
return node;
}
Aggregations