Search in sources :

Example 1 with ReexecutingExecutionPayloadBlockManager

use of tech.pegasys.teku.statetransition.block.ReexecutingExecutionPayloadBlockManager in project teku by ConsenSys.

the class BeaconChainController method initBlockManager.

public void initBlockManager() {
    LOG.debug("BeaconChainController.initBlockManager()");
    final FutureItems<SignedBeaconBlock> futureBlocks = FutureItems.create(SignedBeaconBlock::getSlot);
    BlockValidator blockValidator = new BlockValidator(spec, recentChainData);
    if (spec.isMilestoneSupported(SpecMilestone.BELLATRIX)) {
        blockManager = new ReexecutingExecutionPayloadBlockManager(recentChainData, blockImporter, pendingBlocks, futureBlocks, blockValidator, beaconAsyncRunner);
    } else {
        blockManager = new BlockManager(recentChainData, blockImporter, pendingBlocks, futureBlocks, blockValidator);
    }
    eventChannels.subscribe(SlotEventsChannel.class, blockManager).subscribe(BlockImportChannel.class, blockManager).subscribe(BlockImportNotifications.class, blockManager);
}
Also used : ReexecutingExecutionPayloadBlockManager(tech.pegasys.teku.statetransition.block.ReexecutingExecutionPayloadBlockManager) BlockManager(tech.pegasys.teku.statetransition.block.BlockManager) ReexecutingExecutionPayloadBlockManager(tech.pegasys.teku.statetransition.block.ReexecutingExecutionPayloadBlockManager) SignedBeaconBlock(tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock) BlockValidator(tech.pegasys.teku.statetransition.validation.BlockValidator) MergeTransitionBlockValidator(tech.pegasys.teku.statetransition.forkchoice.MergeTransitionBlockValidator) BlockImportChannel(tech.pegasys.teku.statetransition.block.BlockImportChannel)

Aggregations

SignedBeaconBlock (tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock)1 BlockImportChannel (tech.pegasys.teku.statetransition.block.BlockImportChannel)1 BlockManager (tech.pegasys.teku.statetransition.block.BlockManager)1 ReexecutingExecutionPayloadBlockManager (tech.pegasys.teku.statetransition.block.ReexecutingExecutionPayloadBlockManager)1 MergeTransitionBlockValidator (tech.pegasys.teku.statetransition.forkchoice.MergeTransitionBlockValidator)1 BlockValidator (tech.pegasys.teku.statetransition.validation.BlockValidator)1