Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Nov 10, 2023
1 parent fcc0fd6 commit 8918cd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/ccv/provider/keeper/misbehaviour.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ func headerToLightBlock(h ibctmtypes.Header) (*tmtypes.LightBlock, error) {
// a valid light client attack from an ICS consumer chain and that the light client isn't expired
func (k Keeper) CheckMisbehaviour(ctx sdk.Context, misbehaviour ibctmtypes.Misbehaviour) error {
// check that the misbehaviour is for an ICS consumer chain
clientID, found := k.GetConsumerClientId(ctx, misbehaviour.Header1.Header.ChainID)
clientId, found := k.GetConsumerClientId(ctx, misbehaviour.Header1.Header.ChainID)
if !found {
return fmt.Errorf("incorrect misbehaviour with conflicting headers from a non-existent consumer chain: %s", misbehaviour.Header1.Header.ChainID)
} else if misbehaviour.ClientId != clientID {
} else if misbehaviour.ClientId != clientId {
return fmt.Errorf("incorrect misbehaviour: expected client ID for consumer chain %s is %s got %s",
misbehaviour.Header1.Header.ChainID,
clientID,
clientId,
misbehaviour.ClientId,
)
}
Expand Down

0 comments on commit 8918cd3

Please sign in to comment.