Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(snapshot): set entry expiration info in
set_ledger_info
(#1111)
I've noticed some inconsistencies with snapshot creation and use where the various `*_entry_expiration` values are not set properly when create an `Env` from a snapshot that did have those values set. This could possibly be related to #1101, but I'm not sure, since Leigh seemed more focused on prng. Refs: #1101 ### What This commit updates the ledger-snapshot crate to also set the various ledger entry expiration values, if they are set on the snapshot being set in the environment. ### Why When trying to load a ledger snapshot that I've created from an `Env` with valid entry expiration values, the new Env uses the defaults (which turn out to be `0`) for those expiration values. I noticed trouble trying to run `env.register_contract()` or `env.register_stellar_asset_contract()` in a test file after loading a previously valid snapshot, and receive the error: `trying to bump past max expiration ledger`. (That expiration ledger, being `0` ledgers from now.) ### Known limitations It's possible this is deliberate, and I'm misunderstanding how to use snapshots. If that's the case, we should probably bolster documentation around ledger snapshots to communicate that.
- Loading branch information