Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cosmos/ibc-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: notional-labs/ibc-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: tuan/formatting-enum
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 13 commits
  • 5 files changed
  • 2 contributors

Commits on May 11, 2024

  1. remove unneccessary Wrapf and .String()

    tuantran1702 committed May 11, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    jasnell James M Snell
    Copy the full SHA
    e98db4e View commit details

Commits on May 18, 2024

  1. Merge branch 'main' into tuan/formatting-enum

    tuantran1702 authored May 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    jasnell James M Snell
    Copy the full SHA
    fc9c6cc View commit details

Commits on May 23, 2024

  1. Merge branch 'main' into tuan/formatting-enum

    tuantran1702 authored May 23, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    jasnell James M Snell
    Copy the full SHA
    07f6f13 View commit details

Commits on May 24, 2024

  1. Merge branch 'main' into tuan/formatting-enum

    crodriguezvega authored May 24, 2024

    Unverified

    The signature in this commit could not be verified. Someone may be trying to trick you.
    Copy the full SHA
    aed1de9 View commit details

Commits on May 28, 2024

  1. remove call to String in enum values

    crodriguezvega committed May 28, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    jasnell James M Snell
    Copy the full SHA
    69ef33b View commit details
  2. Merge branch 'main' into tuan/formatting-enum

    tuantran1702 authored May 28, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    danielleadams Danielle Adams
    Copy the full SHA
    d4f5f24 View commit details

Commits on Jun 3, 2024

  1. remove call to String for enum values in log statements

    crodriguezvega committed Jun 3, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    danielleadams Danielle Adams
    Copy the full SHA
    b01ecf2 View commit details

Commits on Jun 4, 2024

  1. Merge branch 'main' into tuan/formatting-enum

    tuantran1702 authored Jun 4, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    8e1977d View commit details

Commits on Jun 6, 2024

  1. Merge branch 'main' into tuan/formatting-enum

    crodriguezvega authored Jun 6, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    f319580 View commit details
  2. Merge branch 'main' into tuan/formatting-enum

    crodriguezvega authored Jun 6, 2024
    Copy the full SHA
    7131744 View commit details
  3. Merge branch 'main' into tuan/formatting-enum

    crodriguezvega authored Jun 6, 2024
    Copy the full SHA
    df9bf1c View commit details
  4. Merge branch 'main' into tuan/formatting-enum

    crodriguezvega authored Jun 6, 2024
    Copy the full SHA
    d907cdf View commit details
  5. Merge branch 'main' into tuan/formatting-enum

    tuantran1702 authored Jun 6, 2024
    Copy the full SHA
    9a5a0a1 View commit details
12 changes: 6 additions & 6 deletions modules/core/03-connection/keeper/handshake.go
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ func (k *Keeper) ConnOpenInit(
connection := types.NewConnectionEnd(types.INIT, clientID, counterparty, versions, delayPeriod)
k.SetConnection(ctx, connectionID, connection)

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

defer telemetry.IncrCounter(1, "ibc", "connection", "open-init")

@@ -142,7 +142,7 @@ func (k *Keeper) ConnOpenTry(
}

k.SetConnection(ctx, connectionID, connection)
k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", types.UNINITIALIZED.String(), "new-state", types.TRYOPEN.String())
k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", types.UNINITIALIZED, "new-state", types.TRYOPEN)

defer telemetry.IncrCounter(1, "ibc", "connection", "open-try")

@@ -187,7 +187,7 @@ func (k *Keeper) ConnOpenAck(
if connection.State != types.INIT {
return errorsmod.Wrapf(
types.ErrInvalidConnectionState,
"connection state is not INIT (got %s)", connection.State.String(),
"connection state is not INIT (got %s)", connection.State,
)
}

@@ -234,7 +234,7 @@ func (k *Keeper) ConnOpenAck(
return err
}

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

defer telemetry.IncrCounter(1, "ibc", "connection", "open-ack")

@@ -269,7 +269,7 @@ func (k *Keeper) ConnOpenConfirm(
if connection.State != types.TRYOPEN {
return errorsmod.Wrapf(
types.ErrInvalidConnectionState,
"connection state is not TRYOPEN (got %s)", connection.State.String(),
"connection state is not TRYOPEN (got %s)", connection.State,
)
}

@@ -288,7 +288,7 @@ func (k *Keeper) ConnOpenConfirm(
// Update ChainB's connection to Open
connection.State = types.OPEN
k.SetConnection(ctx, connectionID, connection)
k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", types.TRYOPEN.String(), "new-state", types.OPEN.String())
k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", types.TRYOPEN, "new-state", types.OPEN)

defer telemetry.IncrCounter(1, "ibc", "connection", "open-confirm")

2 changes: 1 addition & 1 deletion modules/core/04-channel/keeper/grpc_query.go
Original file line number Diff line number Diff line change
@@ -480,7 +480,7 @@ func (k *Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceived
default:
return nil, status.Error(
codes.InvalidArgument,
errorsmod.Wrapf(types.ErrInvalidChannelOrdering, "channel order %s is not supported", channel.Ordering.String()).Error())
errorsmod.Wrapf(types.ErrInvalidChannelOrdering, "channel order %s is not supported", channel.Ordering).Error())
}

selfHeight := clienttypes.GetSelfHeight(ctx)
16 changes: 8 additions & 8 deletions modules/core/04-channel/keeper/handshake.go
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ func (k *Keeper) WriteOpenInitChannel(
k.SetNextSequenceRecv(ctx, portID, channelID, 1)
k.SetNextSequenceAck(ctx, portID, channelID, 1)

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.UNINITIALIZED.String(), "new-state", types.INIT.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.UNINITIALIZED, "new-state", types.INIT)

defer telemetry.IncrCounter(1, "ibc", "channel", "open-init")

@@ -197,7 +197,7 @@ func (k *Keeper) WriteOpenTryChannel(

k.SetChannel(ctx, portID, channelID, channel)

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.UNINITIALIZED.String(), "new-state", types.TRYOPEN.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.UNINITIALIZED, "new-state", types.TRYOPEN)

defer telemetry.IncrCounter(1, "ibc", "channel", "open-try")

@@ -222,7 +222,7 @@ func (k *Keeper) ChanOpenAck(
}

if channel.State != types.INIT {
return errorsmod.Wrapf(types.ErrInvalidChannelState, "channel state should be INIT (got %s)", channel.State.String())
return errorsmod.Wrapf(types.ErrInvalidChannelState, "channel state should be INIT (got %s)", channel.State)
}

if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) {
@@ -272,7 +272,7 @@ func (k *Keeper) WriteOpenAckChannel(
channel.Counterparty.ChannelId = counterpartyChannelID
k.SetChannel(ctx, portID, channelID, channel)

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.INIT.String(), "new-state", types.OPEN.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.INIT, "new-state", types.OPEN)

defer telemetry.IncrCounter(1, "ibc", "channel", "open-ack")

@@ -297,7 +297,7 @@ func (k *Keeper) ChanOpenConfirm(
if channel.State != types.TRYOPEN {
return errorsmod.Wrapf(
types.ErrInvalidChannelState,
"channel state is not TRYOPEN (got %s)", channel.State.String(),
"channel state is not TRYOPEN (got %s)", channel.State,
)
}

@@ -344,7 +344,7 @@ func (k *Keeper) WriteOpenConfirmChannel(

channel.State = types.OPEN
k.SetChannel(ctx, portID, channelID, channel)
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.TRYOPEN.String(), "new-state", types.OPEN.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", types.TRYOPEN, "new-state", types.OPEN)

defer telemetry.IncrCounter(1, "ibc", "channel", "open-confirm")

@@ -390,7 +390,7 @@ func (k *Keeper) ChanCloseInit(
return errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectionEnd.State)
}

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", channel.State.String(), "new-state", types.CLOSED.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", channel.State, "new-state", types.CLOSED)

defer telemetry.IncrCounter(1, "ibc", "channel", "close-init")

@@ -466,7 +466,7 @@ func (k *Keeper) ChanCloseConfirm(
)
}

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", channel.State.String(), "new-state", types.CLOSED.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", channel.State, "new-state", types.CLOSED)

defer telemetry.IncrCounter(1, "ibc", "channel", "close-confirm")

4 changes: 2 additions & 2 deletions modules/core/04-channel/keeper/timeout.go
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ func (k *Keeper) TimeoutPacket(
packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(),
)
default:
panic(errorsmod.Wrapf(types.ErrInvalidChannelOrdering, channel.Ordering.String()))
panic(errorsmod.Wrap(types.ErrInvalidChannelOrdering, channel.Ordering.String()))
}

if err != nil {
@@ -308,7 +308,7 @@ func (k *Keeper) TimeoutOnClose(
packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(),
)
default:
panic(errorsmod.Wrapf(types.ErrInvalidChannelOrdering, channel.Ordering.String()))
panic(errorsmod.Wrap(types.ErrInvalidChannelOrdering, channel.Ordering.String()))
}

if err != nil {
4 changes: 2 additions & 2 deletions modules/core/04-channel/keeper/upgrade.go
Original file line number Diff line number Diff line change
@@ -629,7 +629,7 @@ func (k *Keeper) WriteUpgradeOpenChannel(ctx sdk.Context, portID, channelID stri
// delete state associated with upgrade which is no longer required.
k.deleteUpgradeInfo(ctx, portID, channelID)

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", previousState.String(), "new-state", types.OPEN.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", previousState, "new-state", types.OPEN)
return channel
}

@@ -707,7 +707,7 @@ func (k *Keeper) WriteUpgradeCancelChannel(ctx sdk.Context, portID, channelID st
channel = k.restoreChannel(ctx, portID, channelID, sequence, channel)
k.WriteErrorReceipt(ctx, portID, channelID, types.NewUpgradeError(sequence, types.ErrInvalidUpgrade))

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", previousState, "new-state", types.OPEN.String())
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", previousState, "new-state", types.OPEN)
}

// ChanUpgradeTimeout times out an outstanding upgrade.