fix: only accept a single solver for each pool#6
Conversation
bowenwang1996
left a comment
There was a problem hiding this comment.
It looks like there are no tests for enforcing a single worker. Could you add such a test?
There was a problem hiding this comment.
Pull Request Overview
This PR modifies the solver registry system to enforce only a single active solver per pool, aligning with the title "fix: only accept a single solver for each pool".
Key Changes:
- Refactored test infrastructure by moving utility functions and constants to a common module structure
- Updated Docker Compose to rename service from
cvm_runnertointents_tee_amm_solver - Added comprehensive test coverage for single active worker per pool functionality
Reviewed Changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| server/docker-compose.yaml | Renames service to better reflect its purpose as an intents TEE AMM solver |
| contracts/solver-registry/tests/utils.rs | Removed original utility file - functionality moved to common module |
| contracts/solver-registry/tests/test_single_active_worker.rs | New comprehensive test suite for single active worker enforcement |
| contracts/solver-registry/tests/test_register_worker.rs | New test suite for worker registration functionality |
| contracts/solver-registry/tests/test_basics.rs | Removed original basic tests - replaced by more comprehensive test structure |
| samples/* | Updated test data files with separated Alice/Bob data for multi-worker testing |
| constants.rs | Moved constants to common module structure |
Comments suppressed due to low confidence (2)
contracts/solver-registry/tests/common/constants.rs:1
- The constants file is referenced in test files but not present in the diff. The test files import from
common::constants::*but this module is missing, which will cause compilation failures.
pub const CODE_HASH: &str = "69f1a94f8c2725523087083139f925aae588ffaa76efd08d7ba06529451c31ed";
contracts/solver-registry/tests/common/utils.rs:1
- The utils.rs file is referenced but not present in the diff. Test files are importing from
common::utils::*but this module is missing, which will cause compilation failures.
use std::str::FromStr;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Yes. I have added a few test cases to test enforcing a single worker. Please help review. I also updated |
No description provided.