Skip to content

feat: introduce InsertionOrderedSet for monitored_accounts#178

Open
lpahlavi wants to merge 1 commit intomainfrom
lpahlavi/defi-2780-insertion-ordered-set
Open

feat: introduce InsertionOrderedSet for monitored_accounts#178
lpahlavi wants to merge 1 commit intomainfrom
lpahlavi/defi-2780-insertion-ordered-set

Conversation

@lpahlavi
Copy link
Copy Markdown
Contributor

Summary

  • Adds InsertionOrderedSet<K> in a new utils::insertion_ordered_set module, backed by InsertionOrderedMap<K, ()>
  • Implements only the methods needed at call sites: insert, remove, contains, len, and iter
  • Replaces monitored_accounts: BTreeSet<Account> with InsertionOrderedSet<Account> to preserve insertion order, enabling fair round-robin polling

InsertionOrderedSet deliberately mirrors BTreeSet's API (contains, iter, etc.) so no call sites in deposit::automatic need to change.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 24, 2026 13:19
@lpahlavi lpahlavi changed the title feat: introduce InsertionOrderedSet for monitored_accounts feat: introduce InsertionOrderedSet for monitored_accounts Apr 24, 2026
@lpahlavi lpahlavi requested review from THLO and maciejdfinity April 24, 2026 13:21
@lpahlavi lpahlavi marked this pull request as ready for review April 24, 2026 13:21
@lpahlavi lpahlavi requested a review from a team as a code owner April 24, 2026 13:21
Replace `monitored_accounts: BTreeSet<Account>` with a new
`InsertionOrderedSet<Account>` that preserves insertion order.
The set is backed by `InsertionOrderedMap<K, ()>` and exposes
only the methods needed at call sites: `insert`, `remove`,
`contains`, `len`, and `iter`.

Call sites in `deposit::automatic` are unchanged because
`InsertionOrderedSet` intentionally mirrors `BTreeSet`'s API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lpahlavi lpahlavi force-pushed the lpahlavi/defi-2780-insertion-ordered-set branch from 31bb588 to d653a1a Compare April 24, 2026 13:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants