Skip to content

Commit

Permalink
fixes schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Dec 6, 2021
1 parent a193320 commit 6a07b11
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static tech.pegasys.teku.util.config.Constants.VALID_BLOCK_SET_SIZE;

import com.google.common.base.Objects;
import java.util.Optional;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -116,14 +117,15 @@ public SafeFuture<InternalValidationResult> validate(SignedBeaconBlock block) {
block.getProposerIndex());
}
if (spec.atSlot(block.getSlot()).miscHelpers().isMergeComplete(postState)) {
ExecutionPayload executionPayload =
block
.getMessage()
.getBody()
.getOptionalExecutionPayload()
.orElseThrow();
Optional<ExecutionPayload> executionPayload =
block.getMessage().getBody().getOptionalExecutionPayload();

if (executionPayload.isEmpty()) {
return reject("Missing execution payload");
}

if (executionPayload
.get()
.getTimestamp()
.compareTo(spec.computeTimeAtSlot(postState, block.getSlot()))
!= 0) {
Expand Down

0 comments on commit 6a07b11

Please sign in to comment.