eth/catalyst: fail on duplicate request types (#31071)

Refer to: https://github.com/ethereum/execution-apis/pull/623
This commit is contained in:
Sina M 2025-01-23 20:38:09 +01:00 committed by GitHub
parent d3cc618951
commit 33756802f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1303,7 +1303,8 @@ func validateRequests(requests [][]byte) error {
return fmt.Errorf("empty request: %v", req)
}
// Check that requests are ordered by their type.
if req[0] < last {
// Each type must appear only once.
if req[0] <= last {
return fmt.Errorf("invalid request order: %v", req)
}
last = req[0]