Skip to content

Commit

Permalink
MockExecutionEngine without check parentHash
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Jan 18, 2024
1 parent 551fd8e commit 2034ecd
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/beacon-node/src/execution/engine/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
// validation is locally available. The validation process is specified in the Payload validation section.
//
// > Mock only validates that parent is known
if (!this.validBlocks.has(parentHash)) {
// if requisite data for the payload's acceptance or validation is missing
// return {status: SYNCING, latestValidHash: null, validationError: null}
return {status: ExecutionPayloadStatus.SYNCING, latestValidHash: null, validationError: null};
}

// 4. Client software MAY NOT validate the payload if the payload doesn't belong to the canonical chain.
//
Expand Down Expand Up @@ -253,9 +248,6 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {

// 5. Client software MUST update its forkchoice state if payloads referenced by forkchoiceState.headBlockHash and
// forkchoiceState.finalizedBlockHash are VALID.
if (!this.validBlocks.has(finalizedBlockHash)) {
throw Error(`Unknown finalizedBlockHash ${finalizedBlockHash}`);
}
this.headBlockHash = headBlockHash;
this.safeBlockHash = safeBlockHash;
this.finalizedBlockHash = finalizedBlockHash;
Expand Down

0 comments on commit 2034ecd

Please sign in to comment.