solana
solana copied to clipboard
rpc: add tests for simulate transaction inner instructions
Problem
As of #34313, inner instructions can now optionally be included in the RPC response for simulateTransaction. However, the test coverage on this new feature is lacking.
Summary of Changes
Added some tests specifically for the innerInstructions on the RPC's simulateTransaction method.
Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.
Comparison is base (
a5c470d) 81.7% compared to head (8ec37ad) 81.7%. Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #34495 +/- ##
========================================
Coverage 81.7% 81.7%
========================================
Files 826 826
Lines 223413 223458 +45
========================================
+ Hits 182614 182721 +107
+ Misses 40799 40737 -62
Ah nuts, I think some recent Bank changes nuked this test setup.
This should be ready for another look @CriesofCarrots.
Is there a way to trigger CI manually for PRs? I think the "clippy on MacOS" job hiccuped, but I seem to be compliant here.
I can push a rebase sometime in the future as well to trigger if need be.
So excited for this! If you get a chance to add this to the docs tooβ¦ π€π»
https://github.com/solana-foundation/developer-content/issues/46
I rewrote this to use built-in program instructions to avoid the added dependencies and setup stuff. Much cleaner now.
If we want coverage on the token program instructions, etc. We'll have to consider adding program-test or at least the .so files of the SPL programs we want to test.
And yes, please update the JSON-RPC docs! π (I know I'm going to have a hard time remembering to update them now that they're out of this repo. Hopefully we can help each other :))
And yes, please update the JSON-RPC docs! π (I know I'm going to have a hard time remembering to update them now that they're out of this repo. Hopefully we can help each other :))
I put it on my list!