Skip to content

Commit

Permalink
refactor: fix LVH typo in code
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Aug 5, 2023
1 parent bbadfed commit 30c826a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/beacon-node/src/chain/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export async function processBlocks(
// If segmentExecStatus has lvhForkchoice then, the entire segment should be invalid
// and we need to further propagate
if (segmentExecStatus.execAborted !== null) {
if (segmentExecStatus.invalidSegmentLHV !== undefined) {
this.forkChoice.validateLatestHash(segmentExecStatus.invalidSegmentLHV);
if (segmentExecStatus.invalidSegmentLVH !== undefined) {
this.forkChoice.validateLatestHash(segmentExecStatus.invalidSegmentLVH);
}
throw segmentExecStatus.execAborted.execError;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type SegmentExecStatus =
executionStatuses: MaybeValidExecutionStatus[];
mergeBlockFound: bellatrix.BeaconBlock | null;
}
| {execAborted: ExecAbortType; invalidSegmentLHV?: LVHInvalidResponse; mergeBlockFound: null};
| {execAborted: ExecAbortType; invalidSegmentLVH?: LVHInvalidResponse; mergeBlockFound: null};

type VerifyExecutionErrorResponse =
| {executionStatus: ExecutionStatus.Invalid; lvhResponse: LVHInvalidResponse; execError: BlockError}
Expand Down Expand Up @@ -379,7 +379,7 @@ function getSegmentErrorResponse(
blocks: allForks.SignedBeaconBlock[]
): SegmentExecStatus {
const {executionStatus, lvhResponse, execError} = verifyResponse;
let invalidSegmentLHV: LVHInvalidResponse | undefined = undefined;
let invalidSegmentLVH: LVHInvalidResponse | undefined = undefined;

if (
executionStatus === ExecutionStatus.Invalid &&
Expand Down Expand Up @@ -407,13 +407,13 @@ function getSegmentErrorResponse(
parentBlock.executionStatus !== ExecutionStatus.PreMerge &&
parentBlock.executionPayloadBlockHash !== lvhResponse.latestValidExecHash
) {
invalidSegmentLHV = {
invalidSegmentLVH = {
executionStatus: ExecutionStatus.Invalid,
latestValidExecHash: lvhResponse.latestValidExecHash,
invalidateFromBlockHash: parentBlock.blockRoot,
};
}
}
const execAborted = {blockIndex, execError};
return {execAborted, invalidSegmentLHV} as SegmentExecStatus;
return {execAborted, invalidSegmentLVH} as SegmentExecStatus;
}

0 comments on commit 30c826a

Please sign in to comment.