mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-10 13:01:21 +00:00
e3: reduce buildIndex ctx scope (#889)
This commit is contained in:
parent
e57fe47ffb
commit
e647e5fe3b
@ -215,6 +215,7 @@ func (a *AggregatorV3) BuildOptionalMissedIndices(ctx context.Context, workers i
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *AggregatorV3) BuildMissedIndices(ctx context.Context, sem *semaphore.Weighted) error {
|
func (a *AggregatorV3) BuildMissedIndices(ctx context.Context, sem *semaphore.Weighted) error {
|
||||||
|
{
|
||||||
g, ctx := errgroup.WithContext(ctx)
|
g, ctx := errgroup.WithContext(ctx)
|
||||||
if a.accounts != nil {
|
if a.accounts != nil {
|
||||||
g.Go(func() error { return a.accounts.BuildMissedIndices(ctx, sem) })
|
g.Go(func() error { return a.accounts.BuildMissedIndices(ctx, sem) })
|
||||||
@ -241,6 +242,7 @@ func (a *AggregatorV3) BuildMissedIndices(ctx context.Context, sem *semaphore.We
|
|||||||
if err := g.Wait(); err != nil {
|
if err := g.Wait(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return a.BuildOptionalMissedIndices(ctx, 4)
|
return a.BuildOptionalMissedIndices(ctx, 4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user