From 4501b61262e59229df03f4348c8067c802008821 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 31 Jan 2025 11:20:43 +0100 Subject: [PATCH] log the exact error when updating the network graph with rgs data fails Otherwise a basic error such as wrong chainhash isn't surfaced, making debugging harder. --- src/gossip.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gossip.rs b/src/gossip.rs index be6598c5a..a8a6e3831 100644 --- a/src/gossip.rs +++ b/src/gossip.rs @@ -110,9 +110,15 @@ impl GossipSource { Error::GossipUpdateFailed })?; - let new_latest_sync_timestamp = gossip_sync - .update_network_graph(&update_data) - .map_err(|_| Error::GossipUpdateFailed)?; + let new_latest_sync_timestamp = + gossip_sync.update_network_graph(&update_data).map_err(|e| { + log_trace!( + logger, + "Failed to update network graph with RGS data: {:?}", + e + ); + Error::GossipUpdateFailed + })?; latest_sync_timestamp.store(new_latest_sync_timestamp, Ordering::Release); Ok(new_latest_sync_timestamp) },