Skip to content

Commit

Permalink
Merge branch '04-channel-upgrades' into charly/#3749-msg-server-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
charleenfei committed Jun 20, 2023
2 parents c4f3c81 + 4f5f627 commit 47897ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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 @@ -449,7 +449,7 @@ func (k Keeper) ChanUpgradeTimeout(
// was for a previous sequence by the timeout deadline.
upgradeSequence := channel.UpgradeSequence
if upgradeSequence <= prevErrorReceipt.Sequence {
return errorsmod.Wrapf(types.ErrInvalidUpgradeSequence, "previous counterparty error receipt sequence is greater than our current upgrade sequence: %d > %d", prevErrorReceipt.Sequence, upgradeSequence)
return errorsmod.Wrapf(types.ErrInvalidUpgradeSequence, "previous counterparty error receipt sequence is greater than or equal to our current upgrade sequence: %d > %d", prevErrorReceipt.Sequence, upgradeSequence)
}

if err := k.connectionKeeper.VerifyChannelUpgradeError(
Expand Down
10 changes: 10 additions & 0 deletions modules/core/04-channel/keeper/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ func (suite *KeeperTestSuite) TestChanUpgradeTimeout() {
},
types.ErrInvalidUpgradeSequence,
},
{
"non-nil error receipt: error receipt seq equal to current upgrade seq",
func() {
errReceipt = &types.ErrorReceipt{
Sequence: 1,
Message: types.ErrInvalidUpgrade.Error(),
}
},
types.ErrInvalidUpgradeSequence,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 47897ec

Please sign in to comment.