Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 2, 2024
1 parent 7514f95 commit f0ca69c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ SafeFuture<ForkChoiceUpdatedResult> engineForkChoiceUpdated(
ForkChoiceState forkChoiceState,
Optional<PayloadBuildingAttributes> payloadBuildingAttributes);

SafeFuture<PayloadStatus> engineNewPayload(
NewPayloadRequest newPayloadRequest, final UInt64 slot);
SafeFuture<PayloadStatus> engineNewPayload(NewPayloadRequest newPayloadRequest, UInt64 slot);

SafeFuture<List<ClientVersion>> engineGetClientVersion(ClientVersion clientVersion);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ private SafeFuture<Void> onExecutionPayload(
final SignedExecutionPayloadEnvelope signedEnvelope,
final ExecutionLayerChannel executionLayer) {
final ForkChoicePayloadExecutorEip7732 payloadExecutor =
ForkChoicePayloadExecutorEip7732.create(executionLayer);
ForkChoicePayloadExecutorEip7732.create(executionLayer, block.getSlot());
final BlobSidecarsAvailabilityChecker blobSidecarsAvailabilityChecker =
blobSidecarManager.createAvailabilityChecker(block);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import tech.pegasys.teku.infrastructure.async.SafeFuture;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.NewPayloadRequest;
Expand All @@ -28,15 +29,18 @@ class ForkChoicePayloadExecutorEip7732 implements OptimisticExecutionPayloadExec
private static final Logger LOG = LogManager.getLogger();

private final ExecutionLayerChannel executionLayer;
private final UInt64 slot;

private Optional<SafeFuture<PayloadValidationResult>> result = Optional.empty();

ForkChoicePayloadExecutorEip7732(final ExecutionLayerChannel executionLayer) {
ForkChoicePayloadExecutorEip7732(final ExecutionLayerChannel executionLayer, final UInt64 slot) {
this.executionLayer = executionLayer;
this.slot = slot;
}

public static ForkChoicePayloadExecutorEip7732 create(
final ExecutionLayerChannel executionLayer) {
return new ForkChoicePayloadExecutorEip7732(executionLayer);
final ExecutionLayerChannel executionLayer, final UInt64 slot) {
return new ForkChoicePayloadExecutorEip7732(executionLayer, slot);
}

public SafeFuture<PayloadValidationResult> getExecutionResult() {
Expand All @@ -59,7 +63,7 @@ public boolean optimisticallyExecute(
result =
Optional.of(
executionLayer
.engineNewPayload(payloadToExecute)
.engineNewPayload(payloadToExecute, slot)
.thenCompose(
result -> SafeFuture.completedFuture(new PayloadValidationResult(result)))
.exceptionally(
Expand Down

0 comments on commit f0ca69c

Please sign in to comment.