Skip to content

Commit

Permalink
fix: successful response to persistent
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju committed Dec 2, 2024
1 parent c9a169e commit 5f7cb9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/soroban/contracts/xcall/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub fn increment_last_request_id(e: &Env) -> u128 {
pub fn save_success_response(e: &Env, sn: u128) {
let key = StorageKey::SuccessfulResponses(sn);
e.storage().persistent().set(&key, &true);
extend_persistent(e);
extend_persistent(e, &key);
}

pub fn extend_instance(e: &Env) {
Expand All @@ -251,10 +251,10 @@ pub fn extend_instance(e: &Env) {
.extend_ttl(LEDGER_THRESHOLD_INSTANCE, LEDGER_BUMP_INSTANCE);
}

pub fn extend_persistent(e: &Env) {
pub fn extend_persistent(e: &Env, key: &StorageKey) {
e.storage()
.persistent()
.extend_ttl(LEDGER_THRESHOLD_PERSISTENT, LEDGER_BUMP_PERSISTENT);
.extend_ttl(key, LEDGER_THRESHOLD_PERSISTENT, LEDGER_BUMP_PERSISTENT);
}

pub fn extend_temporary_request(e: &Env, key: &StorageKey) {
Expand Down

0 comments on commit 5f7cb9c

Please sign in to comment.