Skip to content

Commit

Permalink
Only log error when aggregator check fails (#14046)
Browse files Browse the repository at this point in the history
* Only log error when aggregator check fails

* review

(cherry picked from commit 2f2152e)
  • Loading branch information
rkapka authored and prestonvanloon committed May 31, 2024
1 parent 6df83eb commit b807afb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions validator/client/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,8 @@ func (v *validator) RolesAt(ctx context.Context, slot primitives.Slot) (map[[fie

aggregator, err := v.isAggregator(ctx, duty.Committee, slot, bytesutil.ToBytes48(duty.PublicKey), duty.ValidatorIndex)
if err != nil {
return nil, errors.Wrap(err, "could not check if a validator is an aggregator")
aggregator = false
log.WithError(err).Errorf("Could not check if validator %#x is an aggregator", bytesutil.Trunc(duty.PublicKey))
}
if aggregator {
roles = append(roles, iface.RoleAggregator)
Expand All @@ -730,7 +731,8 @@ func (v *validator) RolesAt(ctx context.Context, slot primitives.Slot) (map[[fie
if inSyncCommittee {
aggregator, err := v.isSyncCommitteeAggregator(ctx, slot, bytesutil.ToBytes48(duty.PublicKey), duty.ValidatorIndex)
if err != nil {
return nil, errors.Wrap(err, "could not check if a validator is a sync committee aggregator")
aggregator = false
log.WithError(err).Errorf("Could not check if validator %#x is an aggregator", bytesutil.Trunc(duty.PublicKey))
}
if aggregator {
roles = append(roles, iface.RoleSyncCommitteeAggregator)
Expand Down

0 comments on commit b807afb

Please sign in to comment.