michaelhly / solana-py

Solana Python SDK
https://michaelhly.github.io/solana-py
MIT License
1.04k stars 273 forks source link

Fix: added getInflationReward method #413

Closed kubanemil closed 6 months ago

kubanemil commented 7 months ago

Fixes https://github.com/michaelhly/solana-py/issues/316

Updated this PR https://github.com/michaelhly/solana-py/pull/317

Added tests, however, got the same problem as in the above PR. It seems like a problem in RPC itself because testing with curl yields the same results:

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

@kubanemil would you mind commenting out the integration test and add the following comment:

# XXX: Block not available for slot on local cluster
kubanemil commented 7 months ago

@michaelhly added the comment and also marked tests with @pytest.mark.skip instead of commenting them out.