SpreaderChildOrder::on_order_udpate, changing an asserrt to an error lgo to monitor condition

This commit is contained in:
Taha Afzal committed 2025-02-07 15:06:16 +00:00
1 parent 5217742c71
commit d386d93166
1 file changed
+8 -1
@@ -5,6 +5,7 @@
#include "lib/api/services/OrderService.pb.h"
#include "lib/domain_model/SecurityKey.h"
#include "lib/domain_model/common.h"
#include "lib/logging/logging.h"
#include "lib/orderman/events/OrderStateUpdateEvent.h"
#include "lib/orderman/orderman_utils/orderman_common.h"
#include "lib/orderman/orders/spreader_orders/spreader/ISpreaderManager.h"
@@ -152,7 +153,13 @@ class SpreaderChildOrderState {
// last filled price
void on_order_update(const OrderStateUpdateEvent &e) {
bts_assert(!_is_live || e.key == order_key());
bts_assert(e.filled_quantity >= _filled_quantity.value());
//bts_assert(e.filled_quantity >= _filled_quantity.value());
if (!(e.filled_quantity >= _filled_quantity.value())) {
LOG(OrderMan, Error,
"assert condition e.ok: {} e.qty: {} e.filled_qty: {} "
"_filled_quantity: {}",
e.key, e.quantity, e.filled_quantity, _filled_quantity);
}
_status = e.status;
_last_filled_quantity =
Quantity(e.filled_quantity - _filled_quantity.value());