piq: Add security key to log message

This commit is contained in:
Eric Harding committed 2019-04-26 16:40:59 -04:00
1 parent 43a18941a4
commit 92f67d1d2d
1 file changed
+4 -4
+4 -4
View File
@@ -170,7 +170,7 @@ void copy_to_snapshot(MBOWorkingState& state, MBOSnapshot* dest) {
}
template <class C>
void apply_incremental(C& collection, std::unordered_map<ExchangeOrderKey, MBOWorkingState::key_t>& index, const inc::Update& update) {
void apply_incremental(uint32_t security_key, C& collection, std::unordered_map<ExchangeOrderKey, MBOWorkingState::key_t>& index, const inc::Update& update) {
auto key = std::make_tuple(update.price, update.priority);
switch(update.action) {
case inc::UpdateAction::New:
@@ -186,7 +186,7 @@ void apply_incremental(C& collection, std::unordered_map<ExchangeOrderKey, MBOWo
index.erase(r);
}
else {
LOG(md,Warn, "MBO Update w/out Add for: {}", update);
LOG(md,Warn, "MBO Update w/out Add for: sec:{} {}", security_key, update);
}
collection.insert(std::make_pair(key, MBOWorkingState::Data { update.order_id, update.size }));
index[update.order_id] = key;
@@ -201,10 +201,10 @@ void apply_incremental(C& collection, std::unordered_map<ExchangeOrderKey, MBOWo
void apply_incremental(MBOWorkingState& state, const inc::Update& update) {
// apply the update to the working state
if (update.type == inc::UpdateType::Bid) {
apply_incremental(state.bid, state.orderid_index, update);
apply_incremental(state.handle.key(), state.bid, state.orderid_index, update);
}
else {
apply_incremental(state.ask, state.orderid_index, update);
apply_incremental(state.handle.key(),state.ask, state.orderid_index, update);
}
}