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: eth: eth_subscribe tag #10309

Merged
merged 1 commit into from
Feb 17, 2023
Merged

fix: eth: eth_subscribe tag #10309

merged 1 commit into from
Feb 17, 2023

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Feb 17, 2023

This fixes some errors caught by go vet.

  1. Fixes some lints that were previously being ignored (because go vet doesn't actually have a built-in way to ignore errors).
  2. Fixes the formatting of multiple JSON-RPC API struct tags.

However, I'm not sure why this matters and/or why we even have this tag.

@Stebalien Stebalien requested a review from a team as a code owner February 17, 2023 21:58
@Stebalien Stebalien changed the base branch from release/v1.20.0 to master February 17, 2023 22:02
@Stebalien Stebalien changed the title fix: eth: incorrect struct tags fix: eth: eth_subscribe registration Feb 17, 2023
@Stebalien Stebalien requested review from magik6k and removed request for arajasek February 17, 2023 22:03
@Stebalien Stebalien changed the title fix: eth: eth_subscribe registration fix: eth: eth_subscribe tag Feb 17, 2023
@magik6k
Copy link
Contributor

magik6k commented Feb 17, 2023

I'm not sure why this matters and/or why we even have this tag.

It's probably complaining about the formatting for style reasons - those tags actually parse fine without the space. Also we need them on the proxy struct as it's where the jsonrpc client logic will pull them from. Notif makes the call be a notification, and rpc_method sets a custom rpc method name, which is important for subscription notification

@Stebalien
Copy link
Member Author

rpc_method sets a custom rpc method name, which is important for subscription notification

Except it's the only user of rpc_method?

@Stebalien Stebalien merged commit e51f3e9 into master Feb 17, 2023
@Stebalien Stebalien deleted the steb/incorrect-struct-tags branch February 17, 2023 23:07
@magik6k
Copy link
Contributor

magik6k commented Feb 19, 2023

We could, and probably should rpc_method on other eth methods, but it is technically only necessary on eth subscription callback, as that is a call made by lotus back to the client, so that one must have the correct method name.

Other eth methods don’t really need to be called as eth_ if they are called on lotus rpc, but it would be technically more correct if lotus used eth_

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