Skip to content

fix: implement test suite improvements for issues 205-208 - #331

Merged
james2177 merged 5 commits into
stellar-vortex-protocol:mainfrom
liamscroxx-svg:fix/205-206-207-208-test-implementations
Sep 3, 2026
Merged

fix: implement test suite improvements for issues 205-208#331
james2177 merged 5 commits into
stellar-vortex-protocol:mainfrom
liamscroxx-svg:fix/205-206-207-208-test-implementations

Conversation

@liamscroxx-svg

Copy link
Copy Markdown
Contributor

Summary

This PR implements test suite improvements to fix multiple issues:

Changes

Issue #205

Added CANCEL_COOLDOWN constant (1 hour) to enforce anti-spam mechanism for user intent cancellations, preventing rapid-fire cancellations by a single user.

Issue #206

Fixed syntax error in pauser_cannot_unpause test function by adding missing closing brace and importing CANCEL_COOLDOWN constant for use in cooldown-related tests.

Issue #207

Fixed syntax errors in two test functions:

  • slash_cooldown_expires_after_time_window: Added missing closing brace
  • get_protocol_params_returns_current_constants: Added missing closing brace

Issue #208

Implemented three incomplete test functions:

  • single_fill_at_or_above_minimum_completes_immediately: Tests that a single fill at or above the minimum amount completes an intent immediately
  • double_slash_second_call_rejected: Tests that attempting to slash the same intent twice fails with IntentNotAccepted error
  • fill_intent_fee_overflow_returns_error: Tests fee overflow boundary detection when fill amount exceeds i128::MAX / 5

Test Plan

All test implementations follow established test patterns in the codebase:

  • Use the standard test fixture (Ctx) for setup
  • Verify state transitions through get_intent and get_solver calls
  • Assert expected error conditions with try_* methods
  • Test boundary conditions and edge cases

Closes #205
Closes #206
Closes #207
Closes #208

liamscroxx-svg and others added 5 commits August 31, 2026 10:03
…ntion

Implement anti-spam cooldown mechanism for user cancellations with a 1-hour delay
between cancellations per user to prevent spam and improve system stability.

Closes stellar-vortex-protocol#205
Add missing closing brace for pauser_cannot_unpause test function and
import CANCEL_COOLDOWN constant for use in cancellation tests.

Closes stellar-vortex-protocol#206
…losing braces

Add missing closing braces to slash_cooldown_expires_after_time_window and
get_protocol_params_returns_current_constants test functions to fix
syntax errors.

Closes stellar-vortex-protocol#207
Implement three incomplete test functions:
- single_fill_at_or_above_minimum_completes_immediately: test single fill
  at or above minimum amount completes intent immediately
- double_slash_second_call_rejected: test that double slash on same intent
  fails with IntentNotAccepted error
- fill_intent_fee_overflow_returns_error: test fee overflow boundary
  detection when fill amount exceeds i128::MAX / 5

Closes stellar-vortex-protocol#208
@james2177
james2177 merged commit a94f00e into stellar-vortex-protocol:main Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment