Fix attestation broadcast recovery metric (#7629)

This commit is contained in:
Preston Van Loon 2020-10-23 13:41:17 -05:00 committed by GitHub
parent c59edb3358
commit 9ea69a070e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,9 +84,8 @@ func (s *Service) broadcastAttestation(ctx context.Context, subnet uint64, att *
trace.Int64Attribute("subnet", int64(subnet)),
)
attestationBroadcastAttempts.Inc()
if !hasPeer {
attestationBroadcastAttempts.Inc()
if err := func() error {
s.subnetLocker(subnet).Lock()
defer s.subnetLocker(subnet).Unlock()