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

Fix/channel open/close events #220

Merged
merged 4 commits into from
Jun 18, 2021
Merged

Conversation

seantking
Copy link
Contributor

@seantking seantking commented Jun 18, 2021

Description

Removing the channel modules handler.go file entirely. Events are now emitted directly from the different keeper functions for opening/closing channels.

closes: #219


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 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.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@seantking seantking force-pushed the fix/channel-open-init-event branch from fe7fdbf to 505e7ce Compare June 18, 2021 13:02
@seantking seantking changed the title Fix/channel open init event Fix/channel open/close events Jun 18, 2021
Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Minor nit. Looks good. It seems that the connection handshake and some client messages has a similar problem, where logical events are being emitted in msg server. Do you want to tackle that here, or separate PR?

if err != nil {
return nil, err
return &channeltypes.MsgChannelOpenTryResponse{}, sdkerrors.Wrap(err, "channel handshake open try failed")
Copy link
Member

Choose a reason for hiding this comment

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

Return nil here, since that's what the rest of the file does

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated 👍

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2021

Codecov Report

Merging #220 (5ddd31b) into main (2e95805) will increase coverage by 0.12%.
The diff coverage is 82.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   79.33%   79.46%   +0.12%     
==========================================
  Files         115      115              
  Lines        6746     6837      +91     
==========================================
+ Hits         5352     5433      +81     
- Misses       1016     1026      +10     
  Partials      378      378              
Impacted Files Coverage Δ
modules/core/keeper/msg_server.go 64.85% <63.26%> (+0.85%) ⬆️
modules/core/04-channel/keeper/handshake.go 88.36% <100.00%> (+2.37%) ⬆️

@seantking seantking force-pushed the fix/channel-open-init-event branch from 505e7ce to 5ddd31b Compare June 18, 2021 13:18
@seantking
Copy link
Contributor Author

Minor nit. Looks good. It seems that the connection handshake and some client messages has a similar problem, where logical events are being emitted in msg server. Do you want to tackle that here, or separate PR?

I would prefer to do another PR if possible. This is currently blocking some of the work that I'm trying to get done. Happy to do that Monday though 👍

modules/core/keeper/msg_server.go Outdated Show resolved Hide resolved
modules/core/keeper/msg_server.go Outdated Show resolved Hide resolved
modules/core/keeper/msg_server.go Outdated Show resolved Hide resolved
modules/core/keeper/msg_server.go Outdated Show resolved Hide resolved
modules/core/keeper/msg_server.go Outdated Show resolved Hide resolved
@AdityaSripal AdityaSripal enabled auto-merge (squash) June 18, 2021 13:45
@AdityaSripal AdityaSripal merged commit 38b50b2 into main Jun 18, 2021
@AdityaSripal AdityaSripal deleted the fix/channel-open-init-event branch June 18, 2021 13:52
colin-axner pushed a commit that referenced this pull request Jul 5, 2021
* fix: moving  event to keeper function instead of rpc handler

* refactor: removing unnecessary handler

* refactor: delete channel handler file

* Apply suggestions from code review

Co-authored-by: Aditya <[email protected]>
colin-axner pushed a commit that referenced this pull request Jul 5, 2021
* fix: moving  event to keeper function instead of rpc handler

* refactor: removing unnecessary handler

* refactor: delete channel handler file

* Apply suggestions from code review

Co-authored-by: Aditya <[email protected]>
colin-axner added a commit that referenced this pull request Jul 7, 2021
* Fix/channel open/close events (#220)

* fix: moving  event to keeper function instead of rpc handler

* refactor: removing unnecessary handler

* refactor: delete channel handler file

* Apply suggestions from code review

Co-authored-by: Aditya <[email protected]>

* ibc: fix metrics (#223)

* add missing changelog entries (#230)

* add missing changelog entries

* add missing entry

* Fix missing events in OnRecvPacket (#233)

* fix to set events to the original context

* Update modules/core/keeper/msg_server.go

Co-authored-by: Aditya <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* bump SDK dependency to v0.43.0-rc0 (#229)

Co-authored-by: Aditya <[email protected]>

* Sentinel Root Fix (#234)

* fix sentinel value

* add godoc and test

* fix grammar

* add changelog

Co-authored-by: colin axnér <[email protected]>

* export connection params (#242)

* ensure latest height revision number matches chain id revision number (#241)

* ensure latest height revision number matches chain id revision number

fix tests as well

* add changelog

* Update modules/light-clients/07-tendermint/types/client_state_test.go

* Update modules/light-clients/07-tendermint/types/client_state_test.go

* address review suggestions

* fix merge conflict

Co-authored-by: Sean King <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Jun Kimura <[email protected]>
faddat referenced this pull request in notional-labs/ibc-go Feb 23, 2022
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.

Emit events from keeper instead of rpc handler (Channel Open/Closing)
3 participants