mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-24 15:25:28 -04:00
Initialize reqwest clients with verbose logging
This commit is contained in:
parent
7e688eb7e8
commit
0970c2bc72
6 changed files with 34 additions and 24 deletions
|
@ -25,7 +25,7 @@ pub struct Wallet {
|
|||
impl Wallet {
|
||||
/// Connect to a wallet RPC and load the given wallet by name.
|
||||
pub async fn open_or_create(url: Url, name: String, env_config: Config) -> Result<Self> {
|
||||
let client = wallet::Client::new(url);
|
||||
let client = wallet::Client::new(url)?;
|
||||
|
||||
let open_wallet_response = client.open_wallet(name.clone()).await;
|
||||
if open_wallet_response.is_err() {
|
||||
|
|
|
@ -165,7 +165,7 @@ impl WalletRpc {
|
|||
}
|
||||
|
||||
// Send a json rpc request to make sure monero_wallet_rpc is ready
|
||||
Client::localhost(port).get_version().await?;
|
||||
Client::localhost(port)?.get_version().await?;
|
||||
|
||||
Ok(WalletRpcProcess {
|
||||
_child: child,
|
||||
|
|
|
@ -44,7 +44,7 @@ where
|
|||
let cli = Cli::default();
|
||||
|
||||
let _guard = tracing_subscriber::fmt()
|
||||
.with_env_filter("warn,swap=debug,monero_harness=debug,monero_rpc=debug,bitcoin_harness=info,testcontainers=info")
|
||||
.with_env_filter("warn,swap=debug,monero_harness=debug,monero_rpc=debug,bitcoin_harness=info,testcontainers=info") // add `reqwest::connect::verbose=trace` if you want to logs of the RPC clients
|
||||
.with_test_writer()
|
||||
.set_default();
|
||||
|
||||
|
@ -276,7 +276,7 @@ async fn init_test_wallets(
|
|||
.unwrap();
|
||||
|
||||
let xmr_wallet = swap::monero::Wallet::connect(
|
||||
monero.wallet(name).unwrap().client(),
|
||||
monero.wallet(name).unwrap().client().clone(),
|
||||
name.to_string(),
|
||||
env_config,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue