Skip to content

Commit 33e06d3

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 33e06d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/gossip.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ 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!(logger, "Failed to update network graph with RGS data: {:?}", e);
116+
Error::GossipUpdateFailed
117+
})?;
116118
latest_sync_timestamp.store(new_latest_sync_timestamp, Ordering::Release);
117119
Ok(new_latest_sync_timestamp)
118120
},

0 commit comments

Comments
 (0)