Skip to content

Commit

Permalink
delete GetChainsInProposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Sep 14, 2023
1 parent 0eea515 commit a79f384
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
5 changes: 2 additions & 3 deletions x/ccv/provider/keeper/gov_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (gh GovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID ui
gh.k.DeleteChainsInProposal(ctx, consadditionProp.ChainId)
}

func (gh GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) {
}
func (gh GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) {}

Check failure on line 82 in x/ccv/provider/keeper/gov_hook.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/interchain-security) --custom-order (gci)
func (gh GovHooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) {}
func (gh GovHooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) {}
func (gh GovHooks) AfterProposalFailedMinDeposit(ctx sdk.Context, proposalID uint64) {}

Check failure on line 84 in x/ccv/provider/keeper/gov_hook.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/interchain-security) --custom-order (gci)
11 changes: 0 additions & 11 deletions x/ccv/provider/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ func (k Keeper) DeleteChainToChannel(ctx sdk.Context, chainID string) {
store.Delete(types.ChainToChannelKey(chainID))
}

// GetChainsInProposal gets chainId in gov proposal before voting finishes
func (k Keeper) GetChainsInProposal(ctx sdk.Context, chainID string) (string, bool) {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ChainInProposalKey(chainID))
if bz == nil {
return "", false
}

return string(bz), true
}

// SetChainsInProposal sets consumer chainId in gov consumerAddition proposal in store
// the consumer chainId is only added when the voting period for consumerAddition proposal
// does not end.
Expand Down

0 comments on commit a79f384

Please sign in to comment.