Fix deep source complains (#9485)

This commit is contained in:
terence tsao 2021-08-29 11:57:37 -07:00 committed by GitHub
parent 20a1a58860
commit 572498f954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ import (
// pre computed instances of validators attesting records and total // pre computed instances of validators attesting records and total
// balances attested in an epoch. // balances attested in an epoch.
func InitializeEpochValidators(ctx context.Context, st state.BeaconStateAltair) ([]*precompute.Validator, *precompute.Balance, error) { func InitializeEpochValidators(ctx context.Context, st state.BeaconStateAltair) ([]*precompute.Validator, *precompute.Balance, error) {
ctx, span := trace.StartSpan(ctx, "altair.InitializeEpochValidators") _, span := trace.StartSpan(ctx, "altair.InitializeEpochValidators")
defer span.End() defer span.End()
pValidators := make([]*precompute.Validator, st.NumValidators()) pValidators := make([]*precompute.Validator, st.NumValidators())
bal := &precompute.Balance{} bal := &precompute.Balance{}
@ -73,6 +73,9 @@ func ProcessInactivityScores(
state state.BeaconState, state state.BeaconState,
vals []*precompute.Validator, vals []*precompute.Validator,
) (state.BeaconState, []*precompute.Validator, error) { ) (state.BeaconState, []*precompute.Validator, error) {
_, span := trace.StartSpan(ctx, "altair.ProcessInactivityScores")
defer span.End()
cfg := params.BeaconConfig() cfg := params.BeaconConfig()
if helpers.CurrentEpoch(state) == cfg.GenesisEpoch { if helpers.CurrentEpoch(state) == cfg.GenesisEpoch {
return state, vals, nil return state, vals, nil
@ -132,7 +135,7 @@ func ProcessEpochParticipation(
bal *precompute.Balance, bal *precompute.Balance,
vals []*precompute.Validator, vals []*precompute.Validator,
) ([]*precompute.Validator, *precompute.Balance, error) { ) ([]*precompute.Validator, *precompute.Balance, error) {
ctx, span := trace.StartSpan(ctx, "altair.ProcessEpochParticipation") _, span := trace.StartSpan(ctx, "altair.ProcessEpochParticipation")
defer span.End() defer span.End()
cp, err := state.CurrentEpochParticipation() cp, err := state.CurrentEpochParticipation()