beacon/blsync: ensure blobHashes list is not null

This commit is contained in:
Felix Lange 2024-03-14 23:57:58 +01:00
parent db01089c72
commit ed3856de83

View file

@ -98,7 +98,8 @@ func (ec *engineClient) callNewPayload(fork string, event types.ChainHeadEvent)
return resp.Status, err return resp.Status, err
} }
func collectBlobHashes(b *ctypes.Block) (list []common.Hash) { func collectBlobHashes(b *ctypes.Block) []common.Hash {
list := make([]common.Hash, 0)
for _, tx := range b.Transactions() { for _, tx := range b.Transactions() {
for _, h := range tx.BlobHashes() { for _, h := range tx.BlobHashes() {
list = append(list, h) list = append(list, h)