Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas
This commit is contained in:
commit
2f032def09
1 file changed
+5
-10
+5
-10
@@ -107,12 +107,13 @@ void FifoMergedSecurityMatcher::implied_matching_status(bool value) {
|
||||
}
|
||||
|
||||
void FifoMergedSecurityMatcher::on_order_change(const SmallOrderChange& ch, std::vector<MatchEffect>* effects, FillDepot& fills) {
|
||||
if (!ch.affect_book) {
|
||||
if (_me->implied_matching_status)
|
||||
ERROR("affect-free matching does not support implied markets (implied_matching_status=true, so affect-free fills will be unreliable)");
|
||||
if (!implied_matching_status()) {
|
||||
// there is no "merged matching" when implied matching is off,
|
||||
// just pass the order changes the direct matcher.
|
||||
matcher()->on_order_change(ch, effects);
|
||||
return;
|
||||
}
|
||||
bts_assert_msg(ch.affect_book, "affect-free matching is not supported in markets with implied matching.");
|
||||
switch (ch.change) {
|
||||
case OrderChange::ChangeType::updated: {
|
||||
auto prev_ord_tup = matcher()->find_order(ch.order.key);
|
||||
@@ -320,13 +321,7 @@ MDP3Quantity FifoMergedSecurityMatcher::_fill(
|
||||
effects = new std::vector<MatchEffect>();
|
||||
uint32_t fills_pos = effects->size();
|
||||
auto target_fill_qty = std::min(quantity, get_qty(dtop));
|
||||
// this is temp hack to ensure partial fills are appropriately created
|
||||
auto fill_price = get_price(dtop);
|
||||
if (!implied_matching_status()) {
|
||||
target_fill_qty = quantity;
|
||||
fill_price = price;
|
||||
}
|
||||
auto rem = matcher()->fill(key, side, fill_price, target_fill_qty, effects, true);
|
||||
auto rem = matcher()->fill(key, side, get_price(dtop), target_fill_qty, effects, true);
|
||||
auto fill_qty = target_fill_qty - rem;
|
||||
quantity -= fill_qty;
|
||||
DIAG("filled ", fill_qty, ". Order now: ", ord_desc());
|
||||
|
||||
Reference in new issue
Block a user