mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43: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
|
var requestsHash *common.Hash
|
||||||
if requests != nil {
|
if requests != nil {
|
||||||
|
for _, req := range requests {
|
||||||
|
if len(req) < 2 {
|
||||||
|
return nil, fmt.Errorf("empty request: %v", req)
|
||||||
|
}
|
||||||
|
}
|
||||||
h := types.CalcRequestsHash(requests)
|
h := types.CalcRequestsHash(requests)
|
||||||
requestsHash = &h
|
requestsHash = &h
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue