Skip to main content

promote_replacement_from_query

Function promote_replacement_from_query 

Source
pub fn promote_replacement_from_query(
    report: &OrderStatusReport,
    state: &WsDispatchState,
    emitter: &ExecutionEventEmitter,
    ts_init: UnixNanos,
) -> bool
Expand description

Promotes a cancel-replace replacement surfaced by a query during an in-flight modify.

When the query returns the replacement leg (Accepted, venue_order_id diverging from the cached one, modify tracked), emits the OrderUpdated that rebinds the order, so a dropped replacement Accepted with no fill cannot strand the binding on the canceled leg. Returns true when promoted; the caller still forwards the report so the engine confirms the order.