-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: emitting an event when handling a client upgrade proposal (back…
…port #1570) (#1592) * feat: emitting an event when handling a client upgrade proposal (#1570) * feat: emitting an event when handling a client upgrade proposal * refactor: only emit event if err is nil * refactor: idiotmatic go: (cherry picked from commit 8422d0c) # Conflicts: # CHANGELOG.md # modules/core/02-client/keeper/events.go * Update CHANGELOG.md * Update CHANGELOG.md * fix: imports * remove unused functions Co-authored-by: Sean King <[email protected]> Co-authored-by: Sean King <[email protected]> Co-authored-by: crodriguezvega <[email protected]>
- Loading branch information
1 parent
d1532f4
commit e98a2e9
Showing
4 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package keeper | ||
|
||
import ( | ||
"fmt" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
"github.com/cosmos/ibc-go/v2/modules/core/02-client/types" | ||
) | ||
|
||
// EmitUpgradeClientProposalEvent emits an upgrade client proposal event | ||
func EmitUpgradeClientProposalEvent(ctx sdk.Context, title string, height int64) { | ||
ctx.EventManager().EmitEvent( | ||
sdk.NewEvent( | ||
types.EventTypeUpgradeClientProposal, | ||
sdk.NewAttribute(types.AttributeKeyUpgradePlanTitle, title), | ||
sdk.NewAttribute(types.AttributeKeyUpgradePlanHeight, fmt.Sprintf("%d", height)), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters