Skip to content

Commit

Permalink
Merge branch 'main' into tulasi/expectErrors/23-commitment/types
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim authored Dec 10, 2024
2 parents 3d0fc3f + 30352fb commit 164ce17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/apps/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,18 @@ func (k Keeper) iterateForwardedPackets(ctx context.Context, cb func(packet type
// Iterator key consists of types.ForwardedPacketKey/portID/channelID/sequence
parts := strings.Split(string(iterator.Key()), "/")
if len(parts) != 4 {
panic(fmt.Errorf("key path should always have 4 elements"))
panic(errors.New("key path should always have 4 elements"))
}
if parts[0] != string(types.ForwardedPacketKey) {
panic(fmt.Errorf("key path does not start with expected prefix: %s", types.ForwardedPacketKey))
}

portID, channelID := parts[1], parts[2]
if err := host.PortIdentifierValidator(portID); err != nil {
panic(fmt.Errorf("port identifier validation failed while parsing forward key path"))
panic(errors.New("port identifier validation failed while parsing forward key path"))
}
if err := host.ChannelIdentifierValidator(channelID); err != nil {
panic(fmt.Errorf("channel identifier validation failed while parsing forward key path"))
panic(errors.New("channel identifier validation failed while parsing forward key path"))
}

forwardPacket.ForwardKey.Sequence = sdk.BigEndianToUint64([]byte(parts[3]))
Expand Down
2 changes: 1 addition & 1 deletion modules/core/04-channel/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ func (suite *KeeperTestSuite) UpgradeChannel(path *ibctesting.Path, upgradeField
suite.Require().NoError(err)
}

// sendMockPacket sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle)
// sendMockPackets sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle)
// if acknowledge is true. If acknowledge is false, then the packet will be sent, but timed out.
// Question(jim): find a nicer home for this?
func (suite *KeeperTestSuite) sendMockPackets(path *ibctesting.Path, numPackets int, acknowledge bool) {
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/internal/types/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s ClientRecoveryStore) CacheWrapWithTrace(w io.Writer, tc storetypes.Trace
return cachekv.NewStore(tracekv.NewStore(s, w, tc))
}

// getStore returns the types to be used for the given key and a boolean flag indicating if that types was found.
// GetStore returns the types to be used for the given key and a boolean flag indicating if that type was found.
// If the key is prefixed with "subject/", the subjectStore is returned. If the key is prefixed with "substitute/",
// the substituteStore is returned.
//
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (k Keeper) getQueryPlugins() QueryPlugins {
return k.queryPlugins
}

// SetQueryPlugins sets the plugins.
// setQueryPlugins sets the plugins.
func (k *Keeper) setQueryPlugins(plugins QueryPlugins) {
k.queryPlugins = plugins
}
Expand Down

0 comments on commit 164ce17

Please sign in to comment.