Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contingent order check for order processing in OrderMatchingEngine #1839

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

filipmacek
Copy link
Member

Pull Request

  • changed the type of cache in OrderMatchingEngine to Rc<RefCell<Cache>>
  • created a scope for borrowing cache in process_order as later we need to drop this borrowed cache as later process_*_order need to have mutable access to self
  • implemented contingent order checks
  • simulated OTO order rejected in test_order_matching_engine_contingent_orders_errors

@filipmacek filipmacek added the rust Relating to the Rust core label Aug 9, 2024
@filipmacek filipmacek requested a review from cjdsellers August 9, 2024 07:05
@filipmacek filipmacek self-assigned this Aug 9, 2024
@@ -96,7 +99,7 @@ pub struct OrderMatchingEngine {
pub config: OrderMatchingEngineConfig,
clock: &'static AtomicTime,
msgbus: Rc<MessageBus>,
cache: Rc<Cache>,
cache: Rc<RefCell<Cache>>,
Copy link
Member

Choose a reason for hiding this comment

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

👌

@cjdsellers cjdsellers merged commit ba770b2 into develop Aug 9, 2024
9 checks passed
@cjdsellers cjdsellers deleted the order-matching-engine-contingent-orders-check branch August 9, 2024 07:45
@filipmacek filipmacek linked an issue Aug 12, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Relating to the Rust core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement OrderMatchingEngine in Rust
2 participants