Skip to content

Commit

Permalink
imp: HasUpgrade -> hasUpgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Jan 25, 2024
1 parent a3b133a commit abac302
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/core/04-channel/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ func (k Keeper) setUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string
store.Set(host.ChannelUpgradeErrorKey(portID, channelID), bz)
}

// HasUpgrade returns true if a proposed upgrade exists in store
func (k Keeper) HasUpgrade(ctx sdk.Context, portID, channelID string) bool {
// hasUpgrade returns true if a proposed upgrade exists in store
func (k Keeper) hasUpgrade(ctx sdk.Context, portID, channelID string) bool {
store := ctx.KVStore(k.storeKey)
return store.Has(host.ChannelUpgradeKey(portID, channelID))
}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/04-channel/keeper/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ func (k Keeper) WriteErrorReceipt(ctx sdk.Context, portID, channelID string, upg
// writing an error receipt for. This could lead to divergent behaviour
// on the counterparty.
if channel.UpgradeSequence <= errorReceiptToWrite.Sequence {
upgradeFound := k.HasUpgrade(ctx, portID, channelID)
upgradeFound := k.hasUpgrade(ctx, portID, channelID)
counterpartyUpgradeFound := k.hasCounterpartyUpgrade(ctx, portID, channelID)
if upgradeFound || counterpartyUpgradeFound {
panic(errorsmod.Wrapf(types.ErrInvalidUpgradeSequence, "attempting to write error receipt at sequence (%d) while upgrade information exists at the same sequence", errorReceiptToWrite.Sequence))
Expand Down

0 comments on commit abac302

Please sign in to comment.