mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Handle Attestations in a Separate Goroutine (#3487)
* move into separate routine * preston's review * use opencensus
This commit is contained in:
parent
b63e938cfb
commit
b1b76ac87c
@ -37,11 +37,12 @@ func (as *AttesterServer) SubmitAttestation(ctx context.Context, att *ethpb.Atte
|
||||
return nil, errors.Wrap(err, "failed to sign root attestation")
|
||||
}
|
||||
|
||||
if err := as.operationsHandler.HandleAttestation(ctx, att); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
go func() {
|
||||
ctx = trace.NewContext(context.Background(), trace.FromContext(ctx))
|
||||
if err := as.operationsHandler.HandleAttestation(ctx, att); err != nil {
|
||||
log.WithError(err).Error("could not handle attestation in operations service")
|
||||
return
|
||||
}
|
||||
if err := as.attReceiver.ReceiveAttestation(ctx, att); err != nil {
|
||||
log.WithError(err).Error("could not receive attestation in chain service")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user