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

Refer to: https://github.com/ethereum/execution-apis/pull/623
pull/31075/head
Sina M 1 week ago committed by GitHub
parent d3cc618951
commit 33756802f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      eth/catalyst/api.go

@ -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]

Loading…
Cancel
Save