Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harry/rly tx channel #1183

Merged
merged 3 commits into from
May 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions relayer/chains/cosmos/message_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (ccp *CosmosChainProcessor) handleChannelMessage(eventType string, ci provi
ccp.channelStateCache[channelKey] = false
case chantypes.EventTypeChannelOpenAck, chantypes.EventTypeChannelOpenConfirm:
ccp.channelStateCache[channelKey] = true
ccp.logChannelOpenMessage(eventType, ci)
case chantypes.EventTypeChannelCloseConfirm:
for k := range ccp.channelStateCache {
if k.PortID == ci.PortID && k.ChannelID == ci.ChannelID {
Expand Down Expand Up @@ -182,6 +183,16 @@ func (ccp *CosmosChainProcessor) logChannelMessage(message string, ci provider.C
)
}

func (ccp *CosmosChainProcessor) logChannelOpenMessage(message string, ci provider.ChannelInfo) {
fields := []zap.Field{

zap.String("channel_id", ci.ChannelID),
zap.String("connection_id", ci.ConnID),
zap.String("port_id", ci.PortID),
}
ccp.log.Info("Successfully created new channel", fields...)
}

func (ccp *CosmosChainProcessor) logConnectionMessage(message string, ci provider.ConnectionInfo) {
ccp.logObservedIBCMessage(message,
zap.String("client_id", ci.ClientID),
Expand Down