mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Process future Blocks and Attestations (#8975)
* queue future blocks * process early attestations * fix formatting * fix testcases * fix signature testcase and move verify slot time to original place * Add testcases to test early blocks and slot processing * added test case to cover failure case while inserting in block pending queue * satisfy deepsource * fix review comments * remove invalid testcase * do not queue blocks which are within MAXIMUM_GOSSIP_CLOCK_DISPARITY * format fix * added a helper to check of the block slot is within MAXIMUM_GOSSIP_CLOCK_DISPARITY * add helper to check clock disparity and test case for the same * deepsource fix * satisfy deepsoruce * sysc/service.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -62,6 +62,12 @@ func (s *Service) processPendingBlocks(ctx context.Context) error {
|
||||
|
||||
randGen := rand.NewGenerator()
|
||||
for _, slot := range slots {
|
||||
// process the blocks during their respective slot.
|
||||
// otherwise wait for the right slot to process the block.
|
||||
if slot > s.cfg.Chain.CurrentSlot() {
|
||||
continue
|
||||
}
|
||||
|
||||
ctx, span := trace.StartSpan(ctx, "processPendingBlocks.InnerLoop")
|
||||
span.AddAttributes(trace.Int64Attribute("slot", int64(slot)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user