LiteSVM / litesvm

Apache License 2.0
101 stars 19 forks source link

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

Open OliverNChalk opened 1 week ago

OliverNChalk commented 1 week 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 5 days ago

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

OliverNChalk commented 5 days 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 19 hours 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