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-04-01 09:57:26 +00:00
|
|
|
"git.vdb.to/cerc-io/laconicd/x/registry/keeper"
|
2024-02-15 07:08:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|