mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
beacon/engine: check for empty requests
This commit is contained in:
parent
06883c1686
commit
be52c260a9
1 changed files with 5 additions and 0 deletions
|
|
@ -265,6 +265,11 @@ func ExecutableDataToBlockNoHash(data ExecutableData, versionedHashes []common.H
|
|||
|
||||
var requestsHash *common.Hash
|
||||
if requests != nil {
|
||||
for _, req := range requests {
|
||||
if len(req) < 2 {
|
||||
return nil, fmt.Errorf("empty request: %v", req)
|
||||
}
|
||||
}
|
||||
h := types.CalcRequestsHash(requests)
|
||||
requestsHash = &h
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue