Skip to content

Commit

Permalink
chore: fix error messages for request validation
Browse files Browse the repository at this point in the history
  • Loading branch information
meyer9 committed Jan 24, 2025
1 parent 60f9277 commit 5504ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/payload/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ pub fn validate_execution_requests(requests: &[Bytes]) -> Result<(), EngineObjec
for request in requests {
if request.len() <= 1 {
return Err(EngineObjectValidationError::InvalidParams(
"empty execution request".to_string().into(),
"EmptyExecutionRequest".to_string().into(),
))
}

let request_type = request[0];
if Some(request_type) < last_request_type {
return Err(EngineObjectValidationError::InvalidParams(
"execution requests out of order".to_string().into(),
"OutOfOrderExecutionRequest".to_string().into(),
))
}

Expand Down

0 comments on commit 5504ead

Please sign in to comment.