x/ibc: minor fixes (#6621)
This commit is contained in:
parent
be194ca1b7
commit
0fd559e42d
|
@ -20,7 +20,7 @@ func HandleMsgConnectionOpenInit(ctx sdk.Context, k keeper.Keeper, msg *types.Ms
|
|||
sdk.NewAttribute(types.AttributeKeyConnectionID, msg.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyClientID, msg.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, msg.Counterparty.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnetionID, msg.Counterparty.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, msg.Counterparty.ConnectionID),
|
||||
),
|
||||
sdk.NewEvent(
|
||||
sdk.EventTypeMessage,
|
||||
|
@ -49,7 +49,7 @@ func HandleMsgConnectionOpenTry(ctx sdk.Context, k keeper.Keeper, msg *types.Msg
|
|||
sdk.NewAttribute(types.AttributeKeyConnectionID, msg.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyClientID, msg.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, msg.Counterparty.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnetionID, msg.Counterparty.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, msg.Counterparty.ConnectionID),
|
||||
),
|
||||
sdk.NewEvent(
|
||||
sdk.EventTypeMessage,
|
||||
|
@ -79,7 +79,7 @@ func HandleMsgConnectionOpenAck(ctx sdk.Context, k keeper.Keeper, msg *types.Msg
|
|||
sdk.NewAttribute(types.AttributeKeyConnectionID, msg.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyClientID, connectionEnd.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnetionID, connectionEnd.Counterparty.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionID),
|
||||
),
|
||||
sdk.NewEvent(
|
||||
sdk.EventTypeMessage,
|
||||
|
@ -108,7 +108,7 @@ func HandleMsgConnectionOpenConfirm(ctx sdk.Context, k keeper.Keeper, msg *types
|
|||
sdk.NewAttribute(types.AttributeKeyConnectionID, msg.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyClientID, connectionEnd.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, connectionEnd.Counterparty.ClientID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnetionID, connectionEnd.Counterparty.ConnectionID),
|
||||
sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, connectionEnd.Counterparty.ConnectionID),
|
||||
),
|
||||
sdk.NewEvent(
|
||||
sdk.EventTypeMessage,
|
||||
|
|
|
@ -171,23 +171,3 @@ func (k Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID st
|
|||
k.SetClientConnectionPaths(ctx, clientID, conns)
|
||||
return nil
|
||||
}
|
||||
|
||||
// removeConnectionFromClient is used to remove a connection identifier from the
|
||||
// set of connections associated with a client.
|
||||
//
|
||||
// CONTRACT: client must already exist
|
||||
// nolint: unused
|
||||
func (k Keeper) removeConnectionFromClient(ctx sdk.Context, clientID, connectionID string) error {
|
||||
conns, found := k.GetClientConnectionPaths(ctx, clientID)
|
||||
if !found {
|
||||
return sdkerrors.Wrap(types.ErrClientConnectionPathsNotFound, clientID)
|
||||
}
|
||||
|
||||
conns, ok := host.RemovePath(conns, connectionID)
|
||||
if !ok {
|
||||
return sdkerrors.Wrap(types.ErrConnectionPath, clientID)
|
||||
}
|
||||
|
||||
k.SetClientConnectionPaths(ctx, clientID, conns)
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ import (
|
|||
|
||||
// IBC connection events
|
||||
const (
|
||||
AttributeKeyConnectionID = "connection_id"
|
||||
AttributeKeyClientID = "client_id"
|
||||
AttributeKeyCounterpartyClientID = "counterparty_client_id"
|
||||
AttributeKeyCounterpartyConnetionID = "counterparty_connection_id"
|
||||
AttributeKeyConnectionID = "connection_id"
|
||||
AttributeKeyClientID = "client_id"
|
||||
AttributeKeyCounterpartyClientID = "counterparty_client_id"
|
||||
AttributeKeyCounterpartyConnectionID = "counterparty_connection_id"
|
||||
)
|
||||
|
||||
// IBC connection events vars
|
||||
|
|
Loading…
Reference in New Issue