Search in sources :

Example 1 with DepositUtil

use of tech.pegasys.teku.spec.datastructures.util.DepositUtil in project teku by ConsenSys.

the class DepositProviderTest method setup.

void setup(final int maxDeposits) {
    when(state.getSlot()).thenReturn(UInt64.valueOf(1234));
    SpecConfig specConfig = SpecConfigLoader.loadConfig("minimal", b -> b.maxDeposits(maxDeposits));
    spec = TestSpecFactory.createPhase0(specConfig);
    depositUtil = new DepositUtil(spec);
    dataStructureUtil = new DataStructureUtil(spec);
    depositProvider = new DepositProvider(new StubMetricsSystem(), recentChainData, eth1DataCache, spec);
    depositMerkleTree = new OptimizedMerkleTree(spec.getGenesisSpecConfig().getDepositContractTreeDepth());
    mockStateEth1DataVotes();
    createDepositEvents(40);
    randomEth1Data = dataStructureUtil.randomEth1Data();
}
Also used : DepositUtil(tech.pegasys.teku.spec.datastructures.util.DepositUtil) OptimizedMerkleTree(tech.pegasys.teku.spec.datastructures.util.OptimizedMerkleTree) StubMetricsSystem(tech.pegasys.teku.infrastructure.metrics.StubMetricsSystem) SpecConfig(tech.pegasys.teku.spec.config.SpecConfig) DataStructureUtil(tech.pegasys.teku.spec.util.DataStructureUtil)

Aggregations

StubMetricsSystem (tech.pegasys.teku.infrastructure.metrics.StubMetricsSystem)1 SpecConfig (tech.pegasys.teku.spec.config.SpecConfig)1 DepositUtil (tech.pegasys.teku.spec.datastructures.util.DepositUtil)1 OptimizedMerkleTree (tech.pegasys.teku.spec.datastructures.util.OptimizedMerkleTree)1 DataStructureUtil (tech.pegasys.teku.spec.util.DataStructureUtil)1