Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Sep 21, 2023
1 parent 5a26420 commit 956b4cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions x/ccv/provider/keeper/gov_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package keeper

import (
"fmt"

"github.com/cosmos/gogoproto/proto"

sdk "github.com/cosmos/cosmos-sdk/types"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
sdkgov "github.com/cosmos/cosmos-sdk/x/gov/types"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

"github.com/cosmos/gogoproto/proto"
"github.com/cosmos/interchain-security/v3/x/ccv/provider/types"
)

Expand Down Expand Up @@ -86,6 +88,7 @@ func (gh GovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID ui
}
}

func (gh GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) {}
func (gh GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress) {
}
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) {}
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (k Keeper) GetAllProposedConsumerChainIDs(ctx sdk.Context) []types.Proposed
}

proposedChains = append(proposedChains, types.ProposedChain{
ChainID: chainID,
ChainID: chainID,
ProposalID: proposalID,
})

Expand Down
4 changes: 2 additions & 2 deletions x/ccv/provider/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"

ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

Expand Down Expand Up @@ -496,7 +497,6 @@ func ChainInProposalKey(chainID string, proposalID uint64) []byte {
)
}


func ParseProposedConsumerChainKey(prefix byte, bz []byte) (string, uint64, error) {
expectedPrefix := []byte{prefix}
prefixL := len(expectedPrefix)
Expand All @@ -505,7 +505,7 @@ func ParseProposedConsumerChainKey(prefix byte, bz []byte) (string, uint64, erro
}
chainIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8])
chainID := string(bz[prefixL+8 : prefixL+8+int(chainIdL)])
proposalID := sdk.BigEndianToUint64(bz[prefixL+8+int(chainIdL):])
proposalID := sdk.BigEndianToUint64(bz[prefixL+8+int(chainIdL):])

return chainID, proposalID, nil
}
Expand Down

0 comments on commit 956b4cc

Please sign in to comment.