mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Fix James' comment.
This commit is contained in:
@@ -378,19 +378,23 @@ func (s *Service) processBatchedBlocks(ctx context.Context, bwb []blocks.BlockWi
|
||||
errParentDoesNotExist, firstBlock.Block().ParentRoot(), firstBlock.Block().Slot())
|
||||
}
|
||||
|
||||
// Seaerate blocks with blobs from blocks with data columns.
|
||||
fistDataColumnIndex := sort.Search(len(bwb), func(i int) bool {
|
||||
return bwb[i].Block.Version() >= version.Fulu
|
||||
})
|
||||
count := len(bwb)
|
||||
preFulu, postFulu := make([]blocks.BlockWithROSidecars, 0, count), make([]blocks.BlockWithROSidecars, 0, count)
|
||||
|
||||
blocksWithBlobs := bwb[:fistDataColumnIndex]
|
||||
blocksWithDataColumns := bwb[fistDataColumnIndex:]
|
||||
for _, blockWithSidecars := range bwb {
|
||||
if blockWithSidecars.Block.Version() >= version.Fulu {
|
||||
postFulu = append(postFulu, blockWithSidecars)
|
||||
continue
|
||||
}
|
||||
|
||||
if err := s.processBlocksWithBlobs(ctx, blocksWithBlobs, bFunc, firstBlock); err != nil {
|
||||
preFulu = append(preFulu, blockWithSidecars)
|
||||
}
|
||||
|
||||
if err := s.processBlocksWithBlobs(ctx, preFulu, bFunc, firstBlock); err != nil {
|
||||
return 0, errors.Wrap(err, "processing blocks with blobs")
|
||||
}
|
||||
|
||||
if err := s.processBlocksWithDataColumns(ctx, blocksWithDataColumns, bFunc, firstBlock); err != nil {
|
||||
if err := s.processBlocksWithDataColumns(ctx, postFulu, bFunc, firstBlock); err != nil {
|
||||
return 0, errors.Wrap(err, "processing blocks with data columns")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user