Skip to content

Commit

Permalink
readded slash acks
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed Oct 14, 2024
1 parent 8d0953a commit 0994475
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions x/ccv/provider/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,8 @@ func (k Keeper) OnRecvSlashPacket(
"provider cons addr", providerConsAddr.String(),
)

// Naturally, we do not return a slash ack here because the fact that we are here means:
// i) the chain was at some point launched and hence `k.GetChannelIdToConsumerId` found a consumer (at the beginning
// of the `OnRecvSlashPacket` method);
// ii) the chain is not launched anymore which means the chain is now stopped (with `MsgRemoveConsumer`),
// but the chain is not yet fully removed because otherwise `k.GetChannelIdToConsumerId` would have not found
// a consumer.
// Therefore, we should not expect any more packets to be sent from this chain.
// drop packet but return a slash ack
k.AppendSlashAck(ctx, consumerId, consumerConsAddr.String())

return ccv.SlashPacketHandledResult, nil
}
Expand Down

0 comments on commit 0994475

Please sign in to comment.