From 9634000f5a1a850a73b88a98688fd3b4d4d4bd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 13 Jan 2022 16:21:44 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Sean King --- docs/app_modules/interchain-accounts/ica_auth.md | 3 +-- .../apps/27-interchain-accounts/controller/keeper/relay.go | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/app_modules/interchain-accounts/ica_auth.md b/docs/app_modules/interchain-accounts/ica_auth.md index 2fadbe4b03a..3a48e2ad9f9 100644 --- a/docs/app_modules/interchain-accounts/ica_auth.md +++ b/docs/app_modules/interchain-accounts/ica_auth.md @@ -212,8 +212,7 @@ packetData := icatypes.InterchainAccountPacketData{ // Obtain timeout timestamp // An appropriate timeout timestamp must be determined based on the usage of the interchain account. -// If the packet is timed out, the channel will be closed requiring a new channel to be created -// and reassociated with the existing interchain account on the host chain. +// If the packet times out, the channel will be closed requiring a new channel to be created timeoutTimestamp := obtainTimeoutTimestamp() _, err = keeper.icaControllerKeeper.TrySendTx(ctx, chanCap, p, packetData, timeoutTimestamp) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay.go b/modules/apps/27-interchain-accounts/controller/keeper/relay.go index ab62e5c2249..1381e158bd2 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay.go @@ -10,8 +10,9 @@ import ( channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" ) -// TrySendTx takes in a transaction from an authentication module and attempts to send the packet -// if the base application has the capability to send on the provided portID. An appropriate +// TrySendTx takes pre-built packet data containing messages to be executed on the host chain from an authentication module and attempts to send the packet. +// The packet sequence for the outgoing packet is returned as a result. +// If the base application has the capability to send on the provided portID. An appropriate // absolute timeoutTimestamp must be provided. If the packet is timed out, the channel will be closed. // In the case of channel closure, a new channel may be reopened to reconnect to the host chain. func (k Keeper) TrySendTx(ctx sdk.Context, chanCap *capabilitytypes.Capability, portID string, icaPacketData icatypes.InterchainAccountPacketData, timeoutTimestamp uint64) (uint64, error) {