📌 Description
list_fee_waived_anchors(start, limit) explicitly mirrors list_anchors's pagination pattern per its own doc comment, additionally filtering on is_fee_waived. There is no existing test confirming the two functions produce consistent, comparable pagination results (e.g. that a start index refers to the same underlying AnchorList position in both, and that both correctly skip non-matching/deregistered entries without consuming limit slots) when run against the identical underlying anchor list.
🧩 Requirements and context
- Add a regression test with a mix of registered, deregistered, waived, and non-waived anchors in
AnchorList, then compare list_anchors(start, limit) and list_fee_waived_anchors(start, limit) outputs for consistency with independently-computed expected subsets.
- Cover a
start value that lands in the middle of a run of skipped (deregistered or non-waived) entries for both functions.
- Assert both functions never include more than
limit entries and never miscount skipped entries toward that limit.
🛠️ Suggested execution
- Add the comparative test to
src/test.rs, building a shared anchor-list fixture used by both assertions.
- No production code changes expected — this closes a cross-function consistency test gap.
- Cross-reference the existing 'pagination edge-case regression tests across every list_* entrypoint' issue in this repo's backlog to avoid duplicating its exact scenarios; this issue is specifically about cross-function consistency, not single-function edge cases.
✅ Acceptance criteria
🔒 Security notes
Divergent pagination semantics between two functions documented as mirroring each other could mislead an off-chain client that assumes identical start/limit behavior, silently dropping or duplicating anchors in a paginated UI.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
list_fee_waived_anchors(start, limit)explicitly mirrorslist_anchors's pagination pattern per its own doc comment, additionally filtering onis_fee_waived. There is no existing test confirming the two functions produce consistent, comparable pagination results (e.g. that astartindex refers to the same underlyingAnchorListposition in both, and that both correctly skip non-matching/deregistered entries without consuminglimitslots) when run against the identical underlying anchor list.🧩 Requirements and context
AnchorList, then comparelist_anchors(start, limit)andlist_fee_waived_anchors(start, limit)outputs for consistency with independently-computed expected subsets.startvalue that lands in the middle of a run of skipped (deregistered or non-waived) entries for both functions.limitentries and never miscount skipped entries toward that limit.🛠️ Suggested execution
src/test.rs, building a shared anchor-list fixture used by both assertions.✅ Acceptance criteria
list_anchorsandlist_fee_waived_anchorsbehave consistently against the same underlyingAnchorListfixture.limit.🔒 Security notes
Divergent pagination semantics between two functions documented as mirroring each other could mislead an off-chain client that assumes identical
start/limitbehavior, silently dropping or duplicating anchors in a paginated UI.📋 Guidelines