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

feat: added getInflationReward method #317

Closed
wants to merge 1 commit into from

Conversation

kadern0
Copy link

@kadern0 kadern0 commented Oct 25, 2022

Fixes #316

Signed-off-by: Pablo Caderno kaderno@gmail.com

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #317 (899cbe4) into master (32119e6) will decrease coverage by 0.16%.
The diff coverage is 28.57%.

❗ Current head 899cbe4 differs from pull request most recent head 4b70121. Consider uploading reports for the commit 4b70121 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #317      +/-   ##
==========================================
- Coverage   90.37%   90.20%   -0.17%     
==========================================
  Files          34       34              
  Lines        2555     2562       +7     
==========================================
+ Hits         2309     2311       +2     
- Misses        246      251       +5     

@kevinheavey
Copy link
Collaborator

Can you add tests to tests/integration/test_async_http_client.py and tests/integration/test_http_client.py please? Imitating an existing test should suffice

Signed-off-by: Pablo Caderno <kaderno@gmail.com>
@kadern0
Copy link
Author

kadern0 commented Oct 26, 2022

@kevinheavey, I've added the test code but I'm unable to make it pass. Could you have a look?

@kevinheavey
Copy link
Collaborator

@kadern0 maybe try it with Processed commitment?

@kadern0
Copy link
Author

kadern0 commented Oct 26, 2022

@kevinheavey, using Processed I get:

resp = InvalidParamsMessage {
    message: "Method does not support commitment below `confirmed`",
}

And with Confirmed or Finalized I get:

raw = '{"jsonrpc":"2.0","error":{"code":-32004,"message":"Block not available for slot 8192"},"id":0}\n'
parser = <class 'solders.rpc.responses.GetInflationRewardResp'>

@kevinheavey
Copy link
Collaborator

@kadern0 does it work if you sleep for a few seconds? I think the local validator perhaps hasn't confirmed any blocks by the time we call the method https://docs.rs/solana-rpc/latest/src/solana_rpc/rpc.rs.html#551

@michaelhly
Copy link
Owner

superseded by #413

@michaelhly michaelhly closed this Apr 11, 2024
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.

No method for getInflationReward
3 participants