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

chore: add RecvPacket to V2 #7399

Merged
merged 5 commits into from
Oct 7, 2024
Merged

chore: add RecvPacket to V2 #7399

merged 5 commits into from
Oct 7, 2024

Conversation

bznein
Copy link
Contributor

@bznein bznein commented Oct 7, 2024

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@bznein bznein marked this pull request as ready for review October 7, 2024 10:45
@chatton
Copy link
Contributor

chatton commented Oct 7, 2024

closes #7370

I think

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, leaving approval because the only updates we need are related to logging and docstrings.

Comment on lines 56 to 57
sdkCtx.Logger().Error("send packet failed", "source-id", packet.SourceId, "error", errorsmod.Wrap(err, "send packet failed"))
return nil, errorsmod.Wrapf(err, "send packet failed for source id: %s", packet.SourceId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be logging receive packet here, we can also include the dest-id maybe here

panic("implement me")
func (k *Keeper) RecvPacket(ctx context.Context, msg *channeltypesv2.MsgRecvPacket) (*channeltypesv2.MsgRecvPacketResponse, error) {
sdkCtx := sdk.UnwrapSDKContext(ctx)
packet := msg.Packet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] I think we typically just access msg.Packet when needed rather than storing a separate var here, don't think this is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this was supposed to be "temporary" and I forgot, will remove!


signer, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
sdkCtx.Logger().Error("send packet failed", "error", errorsmod.Wrap(err, "invalid address for msg Signer"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receive packet

modules/core/04-channel/v2/keeper/relay.go Outdated Show resolved Hide resolved
// return nil, err
// }
// }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth mentioning that the remainder of this fn should be wired up in #7354

Copy link

sonarcloud bot commented Oct 7, 2024

@bznein bznein merged commit 049497d into feat/ibc-eureka Oct 7, 2024
64 of 65 checks passed
@bznein bznein deleted the bznein/7370/RecvPacket branch October 7, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants