From ef35c1b21a9bb72f39f2acc280f2b24842bdd65c Mon Sep 17 00:00:00 2001 From: Warm Beer Date: Mon, 6 Jan 2025 14:09:05 +0100 Subject: [PATCH] chore: add more logging to the fetch store quotes fn --- autonomi/src/client/quote.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autonomi/src/client/quote.rs b/autonomi/src/client/quote.rs index ca8c515ad4..b89e1bbf34 100644 --- a/autonomi/src/client/quote.rs +++ b/autonomi/src/client/quote.rs @@ -62,6 +62,7 @@ impl Client { .into_iter() .map(|content_addr| fetch_store_quote_with_retries(&self.network, content_addr)) .collect(); + let raw_quotes_per_addr = futures::future::try_join_all(futures).await?; // choose the quotes to pay for each address @@ -70,9 +71,15 @@ impl Client { let mut rate_limiter = RateLimiter::new(); for (content_addr, raw_quotes) in raw_quotes_per_addr { + debug!( + "fetching market price for content_addr: {content_addr}, with {} quotes.", + raw_quotes.len() + ); + // FIXME: find better way to deal with paid content addrs and feedback to the user // assume that content addr is already paid for and uploaded if raw_quotes.is_empty() { + debug!("content_addr: {content_addr} is already paid for. No need to fetch market price."); continue; } @@ -90,6 +97,8 @@ impl Client { ) .await?; + debug!("market prices: {all_prices:?}"); + let mut prices: Vec<(PeerId, PaymentQuote, Amount)> = all_prices .into_iter() .zip(raw_quotes.into_iter())