Code inspect - clean ups (#8445)

This commit is contained in:
terence tsao
2021-02-12 15:04:45 -08:00
committed by GitHub
parent e2c5ae53e7
commit 068f758f49
17 changed files with 36 additions and 36 deletions

View File

@@ -70,8 +70,8 @@ func (v *validator) SubmitAggregateAndProof(ctx context.Context, slot uint64, pu
SlotSignature: slotSig,
})
if err != nil {
status, ok := status.FromError(err)
if ok && status.Code() == codes.NotFound {
s, ok := status.FromError(err)
if ok && s.Code() == codes.NotFound {
log.WithField("slot", slot).WithError(err).Warn("No attestations to aggregate")
} else {
log.WithField("slot", slot).WithError(err).Error("Could not submit slot signature to beacon node")