diff --git a/daemon/src/maker.rs b/daemon/src/maker.rs index 4a82986..7a18042 100644 --- a/daemon/src/maker.rs +++ b/daemon/src/maker.rs @@ -153,7 +153,7 @@ async fn main() -> Result<()> { ext_priv_key, ) .await?; - let wallet_info = wallet.sync().await.unwrap(); + let wallet_info = wallet.sync().await?; let auth_password = seed.derive_auth_password::(); @@ -178,7 +178,12 @@ async fn main() -> Result<()> { .merge(("address", opts.http_address.ip())) .merge(("port", opts.http_address.port())); - let listener = tokio::net::TcpListener::bind(&format!("0.0.0.0:{}", opts.p2p_port)).await?; + let p2p_socket = format!("0.0.0.0:{}", opts.p2p_port) + .parse::() + .unwrap(); + let listener = tokio::net::TcpListener::bind(p2p_socket) + .await + .with_context(|| format!("Failed to listen on {}", p2p_socket))?; let local_addr = listener.local_addr().unwrap(); tracing::info!("Listening on {}", local_addr); diff --git a/daemon/src/wallet.rs b/daemon/src/wallet.rs index e7c4008..5f1d7ff 100644 --- a/daemon/src/wallet.rs +++ b/daemon/src/wallet.rs @@ -57,7 +57,9 @@ impl Wallet { pub async fn sync(&self) -> Result { let wallet = self.wallet.lock().await; - wallet.sync(NoopProgress, None)?; + wallet + .sync(NoopProgress, None) + .context("Failed to sync wallet")?; let balance = wallet.get_balance()?;