2024-02-15 07:08:32 +00:00
|
|
|
package module
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2024-02-26 06:16:09 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
|
2024-02-15 07:08:32 +00:00
|
|
|
"git.vdb.to/cerc-io/laconic2d/x/registry/keeper"
|
|
|
|
)
|
|
|
|
|
|
|
|
// EndBlocker is called every block
|
|
|
|
func EndBlocker(ctx context.Context, k keeper.Keeper) error {
|
2024-02-26 06:16:09 +00:00
|
|
|
sdkCtx := sdk.UnwrapSDKContext(ctx)
|
|
|
|
|
|
|
|
if err := k.ProcessRecordExpiryQueue(sdkCtx); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2024-02-15 07:08:32 +00:00
|
|
|
|
2024-02-26 06:16:09 +00:00
|
|
|
if err := k.ProcessAuthorityExpiryQueue(sdkCtx); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2024-02-15 07:08:32 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|