Skip to content

issue_ticket doesn't refresh the Event's storage TTL after updating it #10

Description

@presidojay1

issue_ticket writes the updated Event (with incremented tickets_issued) back to persistent storage but never calls extend_ttl afterward. Every other persistent write in the contract (create_event, save_ticket) immediately extends the TTL, so an event that only ever receives issuances (never a fresh create_event call) can approach expiry even while actively in use.

Suggested fix: After the set() call in issue_ticket, add env.storage().persistent().extend_ttl(&DataKey::Event(event_id), LEDGER_THRESHOLD, LEDGER_BUMP); to match the pattern used in create_event/save_ticket.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions