Skip to content

Commit

Permalink
interface: change list_pools() timeout unit micros => millis
Browse files Browse the repository at this point in the history
  • Loading branch information
pythcoiner committed Jan 22, 2025
1 parent b7a835c commit f5d7ace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub async fn initiate_coinjoin(
///
/// # Arguments
/// * `back` - how many second back look in the past
/// * `timeout` - how many microseconds we will wait before fetching relay notifications
/// * `timeout` - how many milliseconds we will wait before fetching relay notifications
/// * `relay` - the relay url, must start w/ `wss://` or `ws://`
///
/// # Returns a [`Vec`] of [`String`] containing a json serialization of a [`Pool`]
Expand All @@ -176,7 +176,7 @@ pub async fn list_pools(
// subscribe to 2020 event up to 1 day back in time
pool_listener.subscribe_pools(back).await.unwrap();

sleep(Duration::from_micros(timeout)).await;
sleep(Duration::from_millis(timeout)).await;

while let Some(pool) = pool_listener.receive_pool_notification()? {
let str = serde_json::to_string(&pool)?;
Expand Down

0 comments on commit f5d7ace

Please sign in to comment.