Skip to content

Commit c48760c

Browse files
committed
Ignore Duplicate Gossip Error while updating networkGraph from RGS #1746
1 parent 559ed20 commit c48760c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lightning-rapid-gossip-sync/src/processing.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,14 @@ impl<NG: Deref<Target=NetworkGraph<L>>, L: Deref> RapidGossipSync<NG, L> where L
194194
synthetic_update.htlc_maximum_msat = htlc_maximum_msat;
195195
}
196196

197-
network_graph.update_channel_unsigned(&synthetic_update)?;
197+
let update_channel_result = network_graph.update_channel_unsigned(&synthetic_update);
198+
if let Err(error) = update_channel_result {
199+
if let ErrorAction::IgnoreDuplicateGossip = error.action {
200+
// Ignore
201+
} else {
202+
return Err(error.into());
203+
}
204+
}
198205
}
199206

200207
self.network_graph.set_last_rapid_gossip_sync_timestamp(latest_seen_timestamp);

0 commit comments

Comments
 (0)