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 optional Event.type #1416

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

penso
Copy link
Contributor

@penso penso commented Apr 27, 2024

Fixes #1415

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

@@ -18,7 +18,7 @@ pub struct Event {
///
/// Tendermint calls this the `type`, but we use `kind` to avoid confusion
/// with Rust types and follow Rust conventions.
#[serde(rename = "type")]
#[serde(rename = "type", default)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is an optimal solution, because it's recreating the data format by hand rather than deriving it from the source of truth (the proto messages). See #1415 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Went for the shortest fix to an immediate issue. But anyone else, please feel free to fix it differently.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.22222% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 59.5%. Comparing base (99ed0b9) to head (90ddb0a).
Report is 10 commits behind head on main.

❗ Current head 90ddb0a differs from pull request most recent head 775d001. Consider uploading reports for the commit 775d001 to get more accurate results

Files Patch % Lines
rpc/tests/dydx_fixtures.rs 97.2% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1416     +/-   ##
=======================================
- Coverage   60.1%   59.5%   -0.6%     
=======================================
  Files        271     272      +1     
  Lines      26221   26795    +574     
=======================================
+ Hits       15768   15963    +195     
- Misses     10453   10832    +379     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Deserialization of abci::Event fails
3 participants