diff --git a/soroban-sdk/src/storage.rs b/soroban-sdk/src/storage.rs index 122714faa..fa805a66a 100644 --- a/soroban-sdk/src/storage.rs +++ b/soroban-sdk/src/storage.rs @@ -153,7 +153,7 @@ impl Storage { pub fn max_ttl(&self) -> u32 { let seq = self.env.ledger().sequence(); let max = self.env.ledger().max_live_until_ledger(); - max - seq + max.saturating_sub(seq) } /// Returns if there is a value stored for the given key in the currently