Skip to content

Commit

Permalink
move call to addConnectionToClient up (#2456)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez authored Oct 4, 2022
1 parent 9fdcf2c commit edc4fd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core/03-connection/keeper/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ func (k Keeper) ConnOpenInit(
versions = []exported.Version{version}
}

// connection defines chain A's ConnectionEnd
connectionID := k.GenerateConnectionIdentifier(ctx)
connection := types.NewConnectionEnd(types.INIT, clientID, counterparty, types.ExportedVersionsToProto(versions), delayPeriod)
k.SetConnection(ctx, connectionID, connection)

if err := k.addConnectionToClient(ctx, clientID, connectionID); err != nil {
return "", err
}

// connection defines chain A's ConnectionEnd
connection := types.NewConnectionEnd(types.INIT, clientID, counterparty, types.ExportedVersionsToProto(versions), delayPeriod)
k.SetConnection(ctx, connectionID, connection)

k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", "NONE", "new-state", "INIT")

defer func() {
Expand Down

0 comments on commit edc4fd0

Please sign in to comment.