fix matcher partial-fills bug

This commit is contained in:
John Colvin committed 2020-11-04 16:15:56 -05:00
1 parent a48686ce11
commit a5ef9fd3cb
1 file changed
+3
@@ -320,6 +320,9 @@ 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
if (!implied_matching_status())
target_fill_qty = quantity;
auto rem = matcher()->fill(key, side, get_price(dtop), target_fill_qty, effects, true);
auto fill_qty = target_fill_qty - rem;
quantity -= fill_qty;