Skip to content

Commit

Permalink
added changelog entry and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed Feb 1, 2024
1 parent 90716b2 commit 8666e26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.changelog/unreleased/features/1587-enable-opt-in-chains-throughgov-proposals.md- Enable Opt In and Top N chains through gov proposals.
([\#1587](https://github.com/cosmos/interchain-security/pull/1587))
4 changes: 4 additions & 0 deletions x/ccv/provider/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,11 @@ func (k Keeper) BeginBlockInit(ctx sdk.Context) {
ctx.Logger().Info("consumer client could not be created: %w", err)
continue
}

// Only set Top N at the moment a chain starts. If we were to do this earlier (e.g., during the proposal),
// then someone could create a bogus ConsumerAdditionProposal to override the Top N for a specific chain.
k.SetTopN(ctx, prop.ChainId, prop.Top_N)

// The cached context is created with a new EventManager so we merge the event
// into the original context
ctx.EventManager().EmitEvents(cachedCtx.EventManager().Events())
Expand Down

0 comments on commit 8666e26

Please sign in to comment.