use of tech.pegasys.teku.spec.logic.versions.phase0.block.BlockProcessorPhase0 in project teku by ConsenSys.
the class SpecLogicPhase0 method create.
public static SpecLogicPhase0 create(final SpecConfig config, final SchemaDefinitions schemaDefinitions) {
// Helpers
final Predicates predicates = new Predicates();
final MiscHelpers miscHelpers = new MiscHelpers(config);
final BeaconStateAccessors beaconStateAccessors = new BeaconStateAccessorsPhase0(config, predicates, miscHelpers);
final BeaconStateMutators beaconStateMutators = new BeaconStateMutators(config, miscHelpers, beaconStateAccessors);
// Operation validaton
final OperationSignatureVerifier operationSignatureVerifier = new OperationSignatureVerifier(miscHelpers, beaconStateAccessors);
// Util
final ValidatorsUtil validatorsUtil = new ValidatorsUtil(config, miscHelpers, beaconStateAccessors);
final BeaconStateUtil beaconStateUtil = new BeaconStateUtil(config, schemaDefinitions, predicates, miscHelpers, beaconStateAccessors);
final AttestationUtil attestationUtil = new AttestationUtil(schemaDefinitions, beaconStateAccessors, miscHelpers);
final OperationValidator operationValidator = OperationValidator.create(config, predicates, miscHelpers, beaconStateAccessors, attestationUtil);
final ValidatorStatusFactoryPhase0 validatorStatusFactory = new ValidatorStatusFactoryPhase0(config, beaconStateUtil, attestationUtil, beaconStateAccessors, predicates);
final EpochProcessorPhase0 epochProcessor = new EpochProcessorPhase0(config, miscHelpers, beaconStateAccessors, beaconStateMutators, validatorsUtil, beaconStateUtil, validatorStatusFactory, schemaDefinitions);
final BlockProcessorPhase0 blockProcessor = new BlockProcessorPhase0(config, predicates, miscHelpers, beaconStateAccessors, beaconStateMutators, operationSignatureVerifier, beaconStateUtil, attestationUtil, validatorsUtil, operationValidator);
final ForkChoiceUtil forkChoiceUtil = new ForkChoiceUtil(config, beaconStateAccessors, attestationUtil, miscHelpers);
final BlockProposalUtil blockProposalUtil = new BlockProposalUtil(schemaDefinitions, blockProcessor);
return new SpecLogicPhase0(predicates, miscHelpers, beaconStateAccessors, beaconStateMutators, operationSignatureVerifier, validatorsUtil, beaconStateUtil, attestationUtil, operationValidator, validatorStatusFactory, epochProcessor, blockProcessor, forkChoiceUtil, blockProposalUtil);
}
Aggregations