Skip to content

Commit

Permalink
set expiration tick to 25 for ordermatching maps
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Jan 9, 2025
1 parent ff4038d commit b698473
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mm2src/mm2_main/src/lp_ordermatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2401,7 +2401,7 @@ impl OrderbookPubkeyState {
pub fn with_history_timeout() -> OrderbookPubkeyState {
OrderbookPubkeyState {
last_keep_alive: now_sec(),
order_pairs_trie_state_history: TimedMap::new_with_map_kind(MapKind::FxHashMap),
order_pairs_trie_state_history: TimedMap::new_with_map_kind(MapKind::FxHashMap).expiration_tick_cap(25),
orders_uuids: HashSet::default(),
trie_roots: HashMap::default(),
}
Expand Down Expand Up @@ -2484,7 +2484,7 @@ impl Default for Orderbook {
unordered: HashMap::default(),
order_set: HashMap::default(),
pubkeys_state: HashMap::default(),
recently_cancelled: TimedMap::new_with_map_kind(MapKind::FxHashMap),
recently_cancelled: TimedMap::new_with_map_kind(MapKind::FxHashMap).expiration_tick_cap(25),
topics_subscribed_to: HashMap::default(),
memory_db: MemoryDB::default(),
my_p2p_pubkeys: HashSet::default(),
Expand Down Expand Up @@ -2555,7 +2555,7 @@ impl Orderbook {
pubkey_state.order_pairs_trie_state_history.insert_expirable_unchecked(
alb_ordered.clone(),
TrieOrderHistory {
inner: TimedMap::new_with_map_kind(MapKind::FxHashMap),
inner: TimedMap::new_with_map_kind(MapKind::FxHashMap).expiration_tick_cap(25),
},
Duration::new(TRIE_STATE_HISTORY_TIMEOUT, 0),
);
Expand Down Expand Up @@ -2670,7 +2670,7 @@ impl Orderbook {
pubkey_state.order_pairs_trie_state_history.insert_expirable_unchecked(
alb_ordered.clone(),
TrieOrderHistory {
inner: TimedMap::new_with_map_kind(MapKind::FxHashMap),
inner: TimedMap::new_with_map_kind(MapKind::FxHashMap).expiration_tick_cap(25),
},
Duration::new(TRIE_STATE_HISTORY_TIMEOUT, 0),
);
Expand Down

0 comments on commit b698473

Please sign in to comment.