Skip to content

Commit

Permalink
review: call const legacy func in use_trading_proto_v2 fnc
Browse files Browse the repository at this point in the history
  • Loading branch information
laruh committed Jan 21, 2025
1 parent 998e75a commit 53d4b40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm2src/mm2_main/src/lp_ordermatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const TRIE_STATE_HISTORY_TIMEOUT: u64 = 3;
const TRIE_ORDER_HISTORY_TIMEOUT: u64 = 300;
#[cfg(test)]
const TRIE_ORDER_HISTORY_TIMEOUT: u64 = 3;
/// Swap protocol version
/// Current swap protocol version
const SWAP_VERSION: u32 = 2;

pub type OrderbookP2PHandlerResult = Result<(), MmError<OrderbookP2PHandlerError>>;
Expand Down Expand Up @@ -1419,7 +1419,7 @@ impl<'a> TakerOrderBuilder<'a> {
/// In the future alls users will be using TPU V2 by default without "use_trading_proto_v2" configuration.
pub fn use_trading_proto_v2(mut self, use_trading_proto_v2: bool) -> Self {
if !use_trading_proto_v2 {
self.swap_version = 1;
self.swap_version = legacy_swap_version();
}
self
}
Expand Down Expand Up @@ -1925,7 +1925,7 @@ impl<'a> MakerOrderBuilder<'a> {
/// In the future alls users will be using TPU V2 by default without "use_trading_proto_v2" configuration.
pub fn use_trading_proto_v2(mut self, use_trading_proto_v2: bool) -> Self {
if !use_trading_proto_v2 {
self.swap_version = 1;
self.swap_version = legacy_swap_version();
}
self
}
Expand Down

0 comments on commit 53d4b40

Please sign in to comment.