Skip to content

Commit

Permalink
Merge pull request #519 from bandprotocol/tunnel-update-interface
Browse files Browse the repository at this point in the history
[Tunnel] update IBC route interface
  • Loading branch information
RogerKSI authored Dec 12, 2024
2 parents 0dd6f4b + b7e23ba commit 77ba945
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 75 deletions.
68 changes: 34 additions & 34 deletions api/band/tunnel/v1beta1/route.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions proto/band/tunnel/v1beta1/route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ message TSSPacketReceipt {
];
}

// IBCRoute is the type for an IBC route
// IBCRoute represents a route for IBC packets and implements the RouteI interface.
message IBCRoute {
option (cosmos_proto.implements_interface) = "Route";
option (cosmos_proto.implements_interface) = "RouteI";

// channel_id is the IBC channel ID
string channel_id = 1 [(gogoproto.customname) = "ChannelID"];
}

// IBCPacketReceipt represents a receipt for a IBC packet and implements the PacketReceiptI interface.
message IBCPacketReceipt {
option (cosmos_proto.implements_interface) = "PacketContentI";
option (cosmos_proto.implements_interface) = "PacketReceiptI";

// sequence is representing the sequence of the IBC packet.
uint64 sequence = 1;
Expand Down
2 changes: 1 addition & 1 deletion x/tunnel/keeper/keeper_packet_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (k Keeper) SendIBCPacket(
portID,
route.ChannelID,
clienttypes.NewHeight(0, 0),
uint64(ctx.BlockTime().UnixNano())+interval*uint64(time.Second),
uint64(ctx.BlockTime().UnixNano())+interval*uint64(time.Second)*2,
packetBytes,
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/tunnel/keeper/keeper_packet_ibc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (s *KeeperTestSuite) TestSendIBCPacket() {

s.scopedKeeper.EXPECT().GetCapability(ctx, gomock.Any()).Return(&capabilitytypes.Capability{}, true)
s.icsWrapper.EXPECT().
SendPacket(ctx, gomock.Any(), "tunnel.1", route.ChannelID, clienttypes.NewHeight(0, 0), uint64(ctx.BlockTime().UnixNano())+interval*uint64(time.Second), gomock.Any()).
SendPacket(ctx, gomock.Any(), "tunnel.1", route.ChannelID, clienttypes.NewHeight(0, 0), uint64(ctx.BlockTime().UnixNano())+interval*uint64(time.Second)*2, gomock.Any()).
Return(uint64(1), nil)

content, err := k.SendIBCPacket(ctx, route, packet, interval)
Expand Down
71 changes: 35 additions & 36 deletions x/tunnel/types/route.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77ba945

Please sign in to comment.