LiteSVM / litesvm

Apache License 2.0
132 stars 24 forks source link

Solana 2 (for real this time) #95

Closed kevinheavey closed 1 month ago

kevinheavey commented 1 month ago

Replacing #76 with this because that is stuck in rebase hell.

I had to do something a bit silly with handle_sysvar because the methods to write to individual fields haven't yet been restored to Solana 2.0. For now we just wipe the whole sysvar cache and rebuild it every time someone writes to a sysvar. Shouldn't matter too much.

I also reduced the NUM_GREETINGS const in the tests that use solana-program-test because it started breaking at higher numbers. That issue is entirely with solana-program-test so we don't care.

The first commit will be useful to refer to when Solana 2.1 comes out. Thanks to @OliverNChalk for doing some leg work there in #94

Closes #94 Closes #76