Skip to content

Commit

Permalink
update timing values
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Nov 13, 2024
1 parent 3692673 commit 8487ab1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mm2src/mm2_main/src/lp_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ use derive_more::Display;
use http::Response;
use mm2_core::mm_ctx::{from_ctx, MmArc};
use mm2_err_handle::prelude::*;
use mm2_libp2p::behaviours::atomicdex::MAX_TIME_GAP_FOR_CONNECTED_PEER;
use mm2_libp2p::{decode_signed, encode_and_sign, pub_sub_topic, PeerId, TopicPrefix};
use mm2_number::{BigDecimal, BigRational, MmNumber, MmNumberMultiRepr};
use mm2_state_machine::storable_state_machine::StateMachineStorage;
Expand Down Expand Up @@ -151,7 +152,7 @@ pub const TX_HELPER_PREFIX: TopicPrefix = "txhlp";
pub(crate) const LEGACY_SWAP_TYPE: u8 = 0;
pub(crate) const MAKER_SWAP_V2_TYPE: u8 = 1;
pub(crate) const TAKER_SWAP_V2_TYPE: u8 = 2;
const MAX_STARTED_AT_DIFF: u64 = 60;
const MAX_STARTED_AT_DIFF: u64 = MAX_TIME_GAP_FOR_CONNECTED_PEER * 3;

const NEGOTIATE_SEND_INTERVAL: f64 = 30.;

Expand Down
2 changes: 1 addition & 1 deletion mm2src/mm2_p2p/src/behaviours/atomicdex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const CHANNEL_BUF_SIZE: usize = 1024 * 8;

/// Used in time validation logic for each peer which runs immediately after the
/// `ConnectionEstablished` event.
const MAX_TIME_GAP_FOR_CONNECTED_PEER: u64 = 30;
pub const MAX_TIME_GAP_FOR_CONNECTED_PEER: u64 = 20;

/// Used for storing peers in [`RECENTLY_DIALED_PEERS`].
const DIAL_RETRY_DELAY: Duration = Duration::from_secs(60 * 5);
Expand Down

0 comments on commit 8487ab1

Please sign in to comment.