Skip to content

Commit

Permalink
More e2e test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
THLO committed Nov 20, 2023
1 parent 239fd02 commit f23cd24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/xrc-tests/src/tests/basic_exchange_rates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ use crate::{
/// 50738517190, 50738517190, 52784267858, 52874875766]
/// 6. The XRC then returns the median and the standard deviation.
/// a. The median rate from step 5 is 43506325069.
/// b. The standard deviation from step 5 is 2794522725.
/// b. The standard deviation from step 5 is 2851294695.
/// Fiat-crypto pair (retrieve EUR/BTC rate)
/// 0. The instructions are similar to the crypto-fiat pair. The only difference is that the rates are inverted before
/// being returned.
Expand Down Expand Up @@ -222,7 +222,7 @@ fn basic_exchange_rates() {
exchange_rate.metadata.quote_asset_num_received_rates,
NUM_FOREX_SOURCES
);
assert_eq!(exchange_rate.metadata.standard_deviation, 2_794_522_725);
assert_eq!(exchange_rate.metadata.standard_deviation, 2_851_294_695);
assert_eq!(exchange_rate.rate, 42_316_582_037);

// Fiat-crypto pair
Expand Down
6 changes: 3 additions & 3 deletions src/xrc-tests/src/tests/misbehavior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ const FIAT_PAIR_COMMON_DATASET_STD_DEV: u64 = 396_623_626;
/// 143100964430, 143121440305, 143133768195, 143209385395, 143250049321, 143428351957, 143670010350, 143778862455, 143819688082,
/// 143998699745, 146322674679, 146433536585, 146475115999, 146657432861, 153039340138, 153155290949, 153198778988, 153389464760 ]
/// 2. The XRC then return the median and the standard deviation.
/// a. The median rate from the group of rates in step 1.a.: 143028398099.
/// b. The standard deviation of the group of rates in step 1.a.: 8426422098.
/// a. The median rate from the group of rates in step 1.a.: 142800903205.
/// b. The standard deviation of the group of rates in step 1.a.: 17672086919.
#[ignore]
#[test]
fn misbehavior() {
Expand Down Expand Up @@ -363,7 +363,7 @@ fn misbehavior() {
base_asset_num_received_rates: NUM_FOREX_SOURCES,
quote_asset_num_queried_sources: NUM_FOREX_SOURCES,
quote_asset_num_received_rates: NUM_FOREX_SOURCES,
standard_deviation: 8_426_422_098,
standard_deviation: 17_672_086_919,
forex_timestamp: Some(yesterday_timestamp_seconds),
},
};
Expand Down

0 comments on commit f23cd24

Please sign in to comment.