Skip to content

Commit

Permalink
Reintroduce logging that is tracked by the tests #366
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsvl committed Mar 25, 2022
1 parent 45251ea commit 9324928
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/zkchannels/merchant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use {
futures::stream::{FuturesUnordered, StreamExt},
rand::{rngs::StdRng, SeedableRng},
sqlx::SqlitePool,
std::{sync::Arc, time::Duration},
std::{net::SocketAddr, sync::Arc, time::Duration},
tokio::signal,
tokio::sync::broadcast,
tracing::{error, info},
Expand All @@ -25,6 +25,7 @@ use crate::{
Chan, Config, Server,
},
protocol::{ChannelStatus, ZkChannels},
TestLogs,
};

mod approve;
Expand Down Expand Up @@ -165,6 +166,8 @@ impl Command for Run {
wait_terminate,
)
.await?;
let address: SocketAddr = address.into();
info!("{}", TestLogs::MerchantServerSpawned(address.to_string()));
Ok::<_, anyhow::Error>(())
}
})
Expand Down Expand Up @@ -298,10 +301,10 @@ async fn dispatch_channel(
database,
&channel.channel_id,
)
.await
.context(
"Failed to finalize mutual close - perhaps the contract was closed by a different flow",
)?;
.await
.context(
"Failed to finalize mutual close - perhaps the contract was closed by a different flow",
)?;
}

Ok(())
Expand All @@ -323,7 +326,7 @@ pub async fn database(config: &Config) -> Result<Arc<dyn QueryMerchant>, anyhow:
DatabaseLocation::Postgres(_) => {
return Err(anyhow::anyhow!(
"Postgres database support is not yet implemented"
))
));
}
};
Ok(database)
Expand Down

0 comments on commit 9324928

Please sign in to comment.