Skip to content

Commit

Permalink
BeginBlocker telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Dec 3, 2023
1 parent 7e7edde commit 5b58d4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ package module
import (
"context"

"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/strangelove-ventures/poa"
)

// BeginBlocker updates the validator set without applying updates.
// Since this module depends on staking, that module will `ApplyAndReturnValidatorSetUpdates` from x/staking.
func (am AppModule) BeginBlocker(ctx context.Context) error {
sdkCtx := sdk.UnwrapSDKContext(ctx)
defer telemetry.ModuleMeasureSince(poa.ModuleName, sdkCtx.BlockTime(), telemetry.MetricKeyBeginBlocker)

vals, err := am.keeper.GetStakingKeeper().GetAllValidators(ctx)
if err != nil {
Expand Down

0 comments on commit 5b58d4b

Please sign in to comment.