LiteSVM / litesvm

Apache License 2.0
132 stars 24 forks source link

litesvm does not enforce rent minimum balance for non-payer accounts #98

Open OliverNChalk opened 1 month ago

OliverNChalk commented 1 month ago

Checking the source, it looks like only the payer account has its post TX rent balance checked. So the question is:

I imagine this was avoided for simplicity/dev experience. However, I've had a snag in that tests that should fail are now passing (i.e. im not properly pre-funding the accounts im allocating and litesvm isnt catching this for me).

I'd be down to take a first swing at such a PR if it's of interest.

Aursen commented 1 month ago

Hi, do you have a code snippet that normally wouldn't work?

OliverNChalk commented 1 month ago

The opposite, I am able to intialize accounts without paying sufficient rent. This is usually fine but it makes testing deployment scripts impossible (because behavior is not 1to1 with mainnet).

kevinheavey commented 1 month ago

Hmm, I think this should be optional and on by default. When it's on, we should also make it impossible to add an account that has insufficient rent