mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 04:26:37 +00:00
eth/catalyst: fail on duplicate request types (#31071)
Refer to: https://github.com/ethereum/execution-apis/pull/623
This commit is contained in:
parent
d3cc618951
commit
33756802f6
1 changed files with 2 additions and 1 deletions
|
|
@ -1303,7 +1303,8 @@ func validateRequests(requests [][]byte) error {
|
||||||
return fmt.Errorf("empty request: %v", req)
|
return fmt.Errorf("empty request: %v", req)
|
||||||
}
|
}
|
||||||
// Check that requests are ordered by their type.
|
// 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)
|
return fmt.Errorf("invalid request order: %v", req)
|
||||||
}
|
}
|
||||||
last = req[0]
|
last = req[0]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue