Skip to content

Commit 4501b61

Browse files
committed
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.
1 parent 83159d0 commit 4501b61

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/gossip.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,15 @@ impl GossipSource {
110110
Error::GossipUpdateFailed
111111
})?;
112112

113-
let new_latest_sync_timestamp = gossip_sync
114-
.update_network_graph(&update_data)
115-
.map_err(|_| Error::GossipUpdateFailed)?;
113+
let new_latest_sync_timestamp =
114+
gossip_sync.update_network_graph(&update_data).map_err(|e| {
115+
log_trace!(
116+
logger,
117+
"Failed to update network graph with RGS data: {:?}",
118+
e
119+
);
120+
Error::GossipUpdateFailed
121+
})?;
116122
latest_sync_timestamp.store(new_latest_sync_timestamp, Ordering::Release);
117123
Ok(new_latest_sync_timestamp)
118124
},

0 commit comments

Comments
 (0)