diff --git a/services/accountmanager/wallet/service.go b/services/accountmanager/wallet/service.go index e80f369..90c096f 100644 --- a/services/accountmanager/wallet/service.go +++ b/services/accountmanager/wallet/service.go @@ -278,18 +278,18 @@ func (s *Service) fetchAccountsForWallet(ctx context.Context, wallet e2wtypes.Wa } // Ensure we can unlock the account with a known passphrase. + unlocked := false if unlocker, isUnlocker := account.(e2wtypes.AccountLocker); isUnlocker { - unlocked := false for _, passphrase := range s.passphrases { if err := unlocker.Unlock(ctx, passphrase); err == nil { unlocked = true break } } - if !unlocked { - log.Warn().Str("account", name).Msg("Failed to unlock account with any passphrase") - continue - } + } + if !unlocked { + log.Warn().Str("account", name).Msg("Failed to unlock account with any passphrase") + continue } // Set up account as unknown to beacon chain. diff --git a/services/beaconcommitteesubscriber/standard/service.go b/services/beaconcommitteesubscriber/standard/service.go index f4501c0..e105093 100644 --- a/services/beaconcommitteesubscriber/standard/service.go +++ b/services/beaconcommitteesubscriber/standard/service.go @@ -76,8 +76,12 @@ func (s *Service) Subscribe(ctx context.Context, epoch spec.Epoch, accounts map[spec.ValidatorIndex]e2wtypes.Account, ) (map[spec.Slot]map[spec.CommitteeIndex]*beaconcommitteesubscriber.Subscription, error) { - started := time.Now() + if len(accounts) == 0 { + // Nothing to do. + return map[spec.Slot]map[spec.CommitteeIndex]*beaconcommitteesubscriber.Subscription{}, nil + } + started := time.Now() log := log.With().Uint64("epoch", uint64(epoch)).Logger() log.Trace().Msg("Subscribing") diff --git a/services/controller/standard/attester.go b/services/controller/standard/attester.go index a18ca3a..7e2a151 100644 --- a/services/controller/standard/attester.go +++ b/services/controller/standard/attester.go @@ -30,6 +30,11 @@ func (s *Service) scheduleAttestations(ctx context.Context, validatorIndices []spec.ValidatorIndex, notCurrentSlot bool, ) { + if len(validatorIndices) == 0 { + // Nothing to do. + return + } + started := time.Now() log.Trace().Uint64("epoch", uint64(epoch)).Msg("Scheduling attestations") diff --git a/services/controller/standard/proposer.go b/services/controller/standard/proposer.go index 31d8d10..88c7f20 100644 --- a/services/controller/standard/proposer.go +++ b/services/controller/standard/proposer.go @@ -28,6 +28,11 @@ func (s *Service) scheduleProposals(ctx context.Context, validatorIndices []spec.ValidatorIndex, notCurrentSlot bool, ) { + if len(validatorIndices) == 0 { + // Nothing to do. + return + } + started := time.Now() log.Trace().Uint64("epoch", uint64(epoch)).Msg("Scheduling proposals") diff --git a/services/submitter/multinode/submitattestations.go b/services/submitter/multinode/submitattestations.go index 262e561..f5ab769 100644 --- a/services/submitter/multinode/submitattestations.go +++ b/services/submitter/multinode/submitattestations.go @@ -69,13 +69,19 @@ func (s *Service) SubmitAttestations(ctx context.Context, attestations []*spec.A data, err2 := json.Marshal(attestations) if err2 != nil { log.Error().Err(err).Msg("Failed to marshal JSON") + } else { + log.Warn().Err(err).Str("data", string(data)).Msg("Invalid signature!") } - log.Warn().Err(err).Str("data", string(data)).Msg("Invalid signature!") default: log.Warn().Err(err).Msg("Failed to submit attestation") } } else { - log.Trace().Msg("Submitted attestations") + data, err := json.Marshal(attestations) + if err != nil { + log.Error().Err(err).Msg("Failed to marshal JSON") + } else { + log.Trace().Str("data", string(data)).Msg("Submitted attestations") + } } }(ctx, sem, &wg, name, submitter) }