Skip to content

Commit

Permalink
Update the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Aug 1, 2023
1 parent 9439173 commit 0d0412b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/beacon-node/src/execution/engine/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ export class ExecutionEngineHttp implements IExecutionEngine {
} catch (err) {
this.updateEngineState(getExecutionEngineState({payloadError: err, oldState: this.state}));

// TODO: This is case where we can't determine the nature of error.
// We should throw only for such cases not for the which we knew the status
/*
* TODO: For some error cases as abort, we may not want to escalate the error to the caller
* But for now the higher level code handles such cases so we can just rethrow the error
*/
throw err;
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/beacon-node/src/execution/engine/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function getExecutionEngineStateForPayloadStatus(payloadStatus: ExecutePayloadSt

default:
// In case we can't determine the state, we assume it stays in old state
// This assumption is better than considering offline, because the offline state may trigger some notifications
return ExecutionEngineState.ONLINE;
}
}
Expand Down

0 comments on commit 0d0412b

Please sign in to comment.