From 484e8efbc5cbb7b25f8483ed5262eb9bd682d6e5 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 7 Mar 2024 19:14:59 +0900 Subject: [PATCH] Fix for comments --- x/foundation/keeper/exported.go | 3 ++- x/foundation/keeper/internal/hooks.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/x/foundation/keeper/exported.go b/x/foundation/keeper/exported.go index 3374b0afac..ff3f3bc33c 100644 --- a/x/foundation/keeper/exported.go +++ b/x/foundation/keeper/exported.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/Finschia/finschia-sdk/x/foundation" "github.com/Finschia/finschia-sdk/x/foundation/keeper/internal" @@ -60,7 +61,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState { return k.impl.ExportGenesis(ctx) } -func (k Keeper) Hooks() internal.Hooks { +func (k Keeper) Hooks() stakingtypes.StakingHooks { return k.impl.Hooks() } diff --git a/x/foundation/keeper/internal/hooks.go b/x/foundation/keeper/internal/hooks.go index 01f3cee616..8885b8e520 100644 --- a/x/foundation/keeper/internal/hooks.go +++ b/x/foundation/keeper/internal/hooks.go @@ -19,19 +19,19 @@ type Hooks struct { // Create new foundation hooks func (k Keeper) Hooks() Hooks { return Hooks{k} } -func (h Hooks) AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterDelegationModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error { +func (h Hooks) AfterUnbondingInitiated(_ context.Context, _ uint64) error { return nil } -func (h Hooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterValidatorBeginUnbonding(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterValidatorBonded(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } @@ -51,26 +51,26 @@ func (h Hooks) AfterValidatorCreated(goCtx context.Context, valAddr sdk.ValAddre return nil } -func (h Hooks) AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { +func (h Hooks) AfterValidatorRemoved(_ context.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h Hooks) BeforeDelegationCreated(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h Hooks) BeforeDelegationRemoved(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { +func (h Hooks) BeforeDelegationSharesModified(_ context.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error { +func (h Hooks) BeforeValidatorModified(_ context.Context, _ sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error { +func (h Hooks) BeforeValidatorSlashed(_ context.Context, _ sdk.ValAddress, _ math.LegacyDec) error { return nil }