mirror of https://github.com/certusone/vouch.git
Exit attest/aggregate routine on attestation failure.
This commit is contained in:
parent
fd5540086f
commit
c6adf2c7e5
|
@ -1,4 +1,5 @@
|
|||
Development
|
||||
- do not attempt to aggregate a failed attestation
|
||||
- error appropriately when misconfigured
|
||||
- avoid crash if accountmanager not configured
|
||||
- avoid crash if beacon committee subscription information is not present
|
||||
|
|
|
@ -102,9 +102,10 @@ func (s *Service) AttestAndScheduleAggregate(ctx context.Context, data interface
|
|||
attestations, err := s.attester.Attest(ctx, duty)
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Msg("Failed to attest")
|
||||
return
|
||||
}
|
||||
|
||||
if len(attestations) == 0 {
|
||||
if len(attestations) == 0 || attestations[0].Data == nil {
|
||||
log.Debug().Msg("No attestations; nothing to aggregate")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue