Skip to content

Commit

Permalink
chore: generate distinct channel identifiers in testing library.
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim committed Oct 21, 2024
1 parent 6078dda commit e3fe06e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/04-channel/v2/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (suite *KeeperTestSuite) TestMsgRecvPacket() {
{
name: "success: NoOp",
malleate: func() {
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetPacketReceipt(suite.chainB.GetContext(), packet.SourceChannel, packet.Sequence)
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetPacketReceipt(suite.chainB.GetContext(), packet.DestinationChannel, packet.Sequence)
expectedAck = channeltypesv2.Acknowledgement{}
},
},
Expand Down Expand Up @@ -228,7 +228,7 @@ func (suite *KeeperTestSuite) TestMsgRecvPacket() {
suite.Require().NoError(err)

// packet receipt should be written
_, ok := ck.GetPacketReceipt(path.EndpointB.Chain.GetContext(), packet.SourceChannel, packet.Sequence)
_, ok := ck.GetPacketReceipt(path.EndpointB.Chain.GetContext(), packet.DestinationChannel, packet.Sequence)
suite.Require().True(ok)

ackWritten := ck.HasPacketAcknowledgement(path.EndpointB.Chain.GetContext(), packet.DestinationChannel, packet.Sequence)
Expand Down
1 change: 1 addition & 0 deletions testing/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (endpoint *Endpoint) ProvideCounterparty() (err error) {

// CreateChannel will construct and execute a new MsgCreateChannel on the associated endpoint.
func (endpoint *Endpoint) CreateChannel() (err error) {
endpoint.IncrementNextChannelSequence()
msg := channeltypesv2.NewMsgCreateChannel(endpoint.ClientID, MerklePath, endpoint.Chain.SenderAccount.GetAddress().String())

// create channel
Expand Down

0 comments on commit e3fe06e

Please sign in to comment.