0g-chain/x/community/abci.go
2024-08-02 12:22:00 +08:00

21 lines
604 B
Go

package community
import (
"time"
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/0glabs/0g-chain/x/community/keeper"
"github.com/0glabs/0g-chain/x/community/types"
)
// BeginBlocker runs the community module begin blocker logic.
func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
// This exact call order is required to allow payout on the upgrade block
k.CheckAndDisableMintAndKavaDistInflation(ctx)
k.PayoutAccumulatedStakingRewards(ctx)
}