Skip to content

Automatic Eviction of Terminal MultiSig Operations - #257

Open
connelevalsam wants to merge 5 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-137
Open

Automatic Eviction of Terminal MultiSig Operations#257
connelevalsam wants to merge 5 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-137

Conversation

@connelevalsam

Copy link
Copy Markdown
Contributor

closes #137

Summary
Implemented automatic eviction of terminal multi-sig operations.
src/types/multisig.ts — Added optional terminalAt?: number to MultiSigOperation, recording when an operation reaches a terminal status (submitted/expired).
src/escrow/multisig.ts

  • Added DEFAULT_MULTISIG_RETENTION_MS (5 min) and optional retentionMs constructor option (backward compatible).
  • Added MultiSigEscrowClientOptions interface.
  • Added public prune() method that evicts terminal-status operations older than the retention window — the operations Map can no longer grow unboundedly.
  • listOperations now calls prune() first, so it returns only retained (non-evicted) operations (documented in typedoc).
  • _markTerminal helper sets terminalAt whenever an operation is flipped to expired or submitted in addSignature, getMultiSigStatus, and submitWhenReady.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@connelevalsam 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

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.

Evict expired and submitted operations from MultiSigEscrowClient's in-memory Map

1 participant