solana-web3.js icon indicating copy to clipboard operation
solana-web3.js copied to clipboard

Figure out how to write a test for `getInflationReward`

Open steveluscher opened this issue 1 year ago • 0 comments

Right now it's not possible to test getInflationReward with a local test validator because:

  • Need to be able to fast-forward the validator to have at least one epoch.
  • Need to prepare a fixture address that is owed an inflation/staking reward.

Figure out how to exercise this functionality and then implement the it.todo() blocks here:

https://github.com/solana-labs/solana-web3.js/blob/ecdf2a7b2332861871250cd5fec6c2927a2a9939/packages/rpc-transport/src/json-rpc-transport/tests/json-rpc-method-get-inflation-reward-test.ts#L23-L27

steveluscher avatar Apr 03 '23 04:04 steveluscher