use of tech.pegasys.teku.spec.logic.common.statetransition.epoch.EpochProcessor in project teku by ConsenSys.
the class EpochProcessingTestExecutor method runTest.
@Override
public void runTest(final TestDefinition testDefinition) throws Exception {
final BeaconState preState = loadStateFromSsz(testDefinition, "pre.ssz_snappy");
final BeaconState expectedPostState = loadStateFromSsz(testDefinition, "post.ssz_snappy");
final SpecVersion genesisSpec = testDefinition.getSpec().getGenesisSpec();
final EpochProcessor epochProcessor = genesisSpec.getEpochProcessor();
final ValidatorStatusFactory validatorStatusFactory = genesisSpec.getValidatorStatusFactory();
final EpochProcessingExecutor processor = new EpochProcessingExecutor(epochProcessor, validatorStatusFactory);
final BeaconState result = preState.updated(state -> processor.executeOperation(operation, state));
assertThat(result).isEqualTo(expectedPostState);
}
Aggregations