stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
128 stars 67 forks source link

extend_ttl function panics in situations not documented #1329

Open leighmcculloch opened 2 months ago

leighmcculloch commented 2 months ago

What version are you using?

SDK: v21.6.0 Env: v21.2.0

What did you do?

It was reported that a call to extend_ttl panics when the ledger key doesn't exist: https://discord.com/channels/897514728459468821/1281892101264769055

What did you expect to see?

Undefined.

What did you see instead?

Panic.

It's not documented in the SDK docs: https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Persistent.html#method.extend_ttl

Or in the Env: https://github.com/stellar/rs-soroban-env/blob/v21.2.1/soroban-env-common/env.json#L1364-L1385