Validate that IcebergOrders must have child definitions.

This commit is contained in:
Pedro Pinto committed 2019-03-08 17:56:27 -05:00
1 parent 609b0dceb1
commit 80ce5447e5
1 file changed
+2 -4
+2 -4
View File
@@ -88,11 +88,9 @@ void IcebergOrder2::on_init_new(OrderDefinition const &def,
"Show quantity must be greater than 0");
return;
}
auto attach_target = OrderKey(me->def.attach_target_order_key());
if (!ib.has_child() && attach_target == null_order_key()) {
if (!ib.has_child()) {
terminate(ORDER_STATUS_REJECTED_BY_SPARK,
"Iceberg order must have a child order definition or attach to "
"an existing order");
"Iceberg order must have a child order definition");
return;
}
initialize_child_builder(services.order_factory);