Skip to content

test(escrow): add TTL refresh coverage for PlayerMatches index#684

Merged
yahia008 merged 1 commit into
StellarCheckMate:mainfrom
D-Ochuko:feat/Add-Test-player-match-index-TTL-refreshes-on-append-and-read
May 28, 2026
Merged

test(escrow): add TTL refresh coverage for PlayerMatches index#684
yahia008 merged 1 commit into
StellarCheckMate:mainfrom
D-Ochuko:feat/Add-Test-player-match-index-TTL-refreshes-on-append-and-read

Conversation

@D-Ochuko
Copy link
Copy Markdown
Contributor

closes #621

Extend TTL on PlayerMatches persistent storage in both the write path (create_match) and the read path (get_player_matches), and add two tests that assert the index TTL is reset to MATCH_TTL_LEDGERS after each operation.

Summary of changes:

  • contracts/escrow/src/lib.rs — create_match: added extend_ttl for PlayerMatches after each set in the player loop. get_player_matches: extended TTL when the key exists before returning.
  • contracts/escrow/src/tests.rs — added test_player_match_index_ttl_refreshes_on_append and test_player_match_indeto make the TTL decay observable before asserting it resets to
    MATCH_TTL_LEDGERS.

Extend TTL on PlayerMatches persistent storage in both the write path
(create_match) and the read path (get_player_matches), and add two tests
that assert the index TTL is reset to MATCH_TTL_LEDGERS after each
operation.
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@D-Ochuko Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yahia008 yahia008 merged commit 07bb35b into StellarCheckMate:main May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Test: player-match index TTL refreshes on append and read

2 participants