Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kincaidoneil committed Feb 7, 2020
1 parent 0183fae commit 2bfed61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/interledger-rates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub struct ExchangeRateFetcher<S> {
consecutive_failed_polls: Arc<AtomicU32>,
failed_polls_before_invalidation: u32,
store: S,
client: Client, // TODO What is a Client?
client: Client,
}

impl<S> ExchangeRateFetcher<S>
Expand Down
1 change: 1 addition & 0 deletions crates/interledger-stream/src/congestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl CongestionController {
}
}

/// The maximum amount availble to be sent is the maximum amount in flight minus the current amount in flight
pub fn get_max_amount(&self) -> u64 {
if self.amount_in_flight > self.max_in_flight {
return 0;
Expand Down
11 changes: 4 additions & 7 deletions crates/interledger-stream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,9 @@ mod send_money_to_receiver {
.await;

// Connector takes 2% spread, but we're only willing to tolerate 1.4%
assert!(
match result {
Err(Error::SendMoneyError(_)) => true,
_ => false,
},
"Payment should fail fast due to poor exchange rate"
);
match result {
Err(Error::SendMoneyError(_)) => {}
_ => panic!("Payment should fail fast due to poor exchange rates"),
}
}
}

0 comments on commit 2bfed61

Please sign in to comment.