kraken: engine: fix comparisons
This commit is contained in:
parent
8fb81379a6
commit
efd37ec22c
|
@ -113,7 +113,7 @@ void Engine::operator()(TradeOrder const& trade_order) {
|
|||
bid_map_it != bids_.end()) {
|
||||
auto& [_, bid_map] = *bid_map_it;
|
||||
if (bid_map.size() > 0
|
||||
&& bid_map.begin()->first <= trade_order.price) {
|
||||
&& bid_map.begin()->first >= trade_order.price) {
|
||||
// FIXME: handle matching if enabled
|
||||
listener_->on_rejection(trade_order.user, trade_order.id);
|
||||
return;
|
||||
|
@ -128,7 +128,7 @@ void Engine::operator()(TradeOrder const& trade_order) {
|
|||
ask_map_it != asks_.end()) {
|
||||
auto& [_, ask_map] = *ask_map_it;
|
||||
if (ask_map.size() > 0
|
||||
&& ask_map.begin()->first >= trade_order.price) {
|
||||
&& ask_map.begin()->first <= trade_order.price) {
|
||||
// FIXME: handle matching if enabled
|
||||
listener_->on_rejection(trade_order.user, trade_order.id);
|
||||
return;
|
||||
|
|
|
@ -39,8 +39,8 @@ private:
|
|||
template <typename Order>
|
||||
using instrument_side_data = std::multimap<Price, OrderMetaData, Order>;
|
||||
|
||||
std::map<Symbol, instrument_side_data<std::less<void>>> bids_;
|
||||
std::map<Symbol, instrument_side_data<std::greater<void>>> asks_;
|
||||
std::map<Symbol, instrument_side_data<std::greater<void>>> bids_;
|
||||
std::map<Symbol, instrument_side_data<std::less<void>>> asks_;
|
||||
};
|
||||
|
||||
} // namespace kraken::engine
|
||||
|
|
Loading…
Reference in a new issue