Skip to content

Commit

Permalink
* fix consts comments and move TAKER_PAYMENT_SPEND_SEARCH_INTERVAL
Browse files Browse the repository at this point in the history
…to the only place it's used

* use not wasm attribute for solana macros
  • Loading branch information
shamardy committed Sep 20, 2024
1 parent ab52cf5 commit 4bded2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions mm2src/coins/eth/eth_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ cfg_native!(

/// The gas price for the tests
const GAS_PRICE: u64 = 50_000_000_000;
// `GAS_PRICE` increased by 3%
/// `GAS_PRICE` increased by 3%
const GAS_PRICE_APPROXIMATION_ON_START_SWAP: u64 = 51_500_000_000;
// `GAS_PRICE` increased by 5%
/// `GAS_PRICE` increased by 5%
const GAS_PRICE_APPROXIMATION_ON_ORDER_ISSUE: u64 = 52_500_000_000;
// `GAS_PRICE` increased by 7%
/// `GAS_PRICE` increased by 7%
const GAS_PRICE_APPROXIMATION_ON_TRADE_PREIMAGE: u64 = 53_500_000_000;

const TAKER_PAYMENT_SPEND_SEARCH_INTERVAL: f64 = 1.;
);

// old way to add some extra gas to the returned value from gas station (non-existent now), still used in tests
Expand Down Expand Up @@ -163,6 +161,8 @@ fn test_wei_from_big_decimal() {
#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_wait_for_payment_spend_timeout() {
const TAKER_PAYMENT_SPEND_SEARCH_INTERVAL: f64 = 1.;

EthCoin::spend_events.mock_safe(|_, _, _, _| MockResult::Return(Box::new(futures01::future::ok(vec![]))));
EthCoin::current_block.mock_safe(|_| MockResult::Return(Box::new(futures01::future::ok(900))));

Expand Down
4 changes: 2 additions & 2 deletions mm2src/coins/lp_coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ macro_rules! try_f {
};
}

#[cfg(feature = "enable-solana")]
#[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
macro_rules! try_tx_fus_err {
($err: expr) => {
return Box::new(futures01::future::err(crate::TransactionErr::Plain(ERRL!(
Expand All @@ -133,7 +133,7 @@ macro_rules! try_tx_fus_err {
};
}

#[cfg(feature = "enable-solana")]
#[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
macro_rules! try_tx_fus_opt {
($e: expr, $err: expr) => {
match $e {
Expand Down

0 comments on commit 4bded2e

Please sign in to comment.