Skip to content

Commit

Permalink
Refactor channel upgradability msgs to reflect updated spec (#4456)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Aug 24, 2023
1 parent b1ef4c1 commit 404da25
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 278 deletions.
17 changes: 7 additions & 10 deletions modules/core/04-channel/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,20 +751,17 @@ var _ sdk.Msg = &MsgChannelUpgradeTimeout{}
func NewMsgChannelUpgradeTimeout(
portID, channelID string,
counterpartyChannel Channel,
errorReceipt *ErrorReceipt,
proofChannel, proofErrorReceipt []byte,
proofChannel []byte,
proofHeight clienttypes.Height,
signer string,
) *MsgChannelUpgradeTimeout {
return &MsgChannelUpgradeTimeout{
PortId: portID,
ChannelId: channelID,
CounterpartyChannel: counterpartyChannel,
PreviousErrorReceipt: errorReceipt,
ProofChannel: proofChannel,
ProofErrorReceipt: proofErrorReceipt,
ProofHeight: proofHeight,
Signer: signer,
PortId: portID,
ChannelId: channelID,
CounterpartyChannel: counterpartyChannel,
ProofChannel: proofChannel,
ProofHeight: proofHeight,
Signer: signer,
}
}

Expand Down
18 changes: 4 additions & 14 deletions modules/core/04-channel/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,16 +862,6 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTimeoutValidateBasic() {
func() {},
true,
},
{
"success with non-nil error receipt",
func() {
msg.PreviousErrorReceipt = &types.ErrorReceipt{
Sequence: 1,
Message: "error message",
}
},
true,
},
{
"invalid port identifier",
func() {
Expand Down Expand Up @@ -914,8 +904,8 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTimeoutValidateBasic() {
suite.Run(tc.name, func() {
msg = types.NewMsgChannelUpgradeTimeout(
ibctesting.MockPort, ibctesting.FirstChannelID,
types.Channel{State: types.OPEN}, nil,
suite.proof, suite.proof,
types.Channel{State: types.OPEN},
suite.proof,
height, addr,
)

Expand All @@ -937,8 +927,8 @@ func (suite *TypesTestSuite) TestMsgChannelUpgradeTimeoutGetSigners() {

msg := types.NewMsgChannelUpgradeTimeout(
ibctesting.MockPort, ibctesting.FirstChannelID,
types.Channel{}, nil,
suite.proof, suite.proof,
types.Channel{},
suite.proof,
height, addr,
)

Expand Down
Loading

0 comments on commit 404da25

Please sign in to comment.