diff --git a/crates/ln-dlc-node/src/ldk_node_wallet.rs b/crates/ln-dlc-node/src/ldk_node_wallet.rs index 29e46cd0f..73522b15d 100644 --- a/crates/ln-dlc-node/src/ldk_node_wallet.rs +++ b/crates/ln-dlc-node/src/ldk_node_wallet.rs @@ -274,14 +274,14 @@ where tracing::info!(%txid, raw_tx = %serialize_hex(&tx), "Broadcasting transaction"); + if let Err(e) = self.node_storage.upsert_transaction(tx.into()) { + tracing::error!("Failed to store transaction {txid}. Error: {e:#}"); + } + self.blockchain .broadcast(tx) .with_context(|| format!("Failed to broadcast transaction {txid}"))?; - self.node_storage - .upsert_transaction(tx.into()) - .with_context(|| format!("Failed to store transaction {txid}"))?; - Ok(txid) } }