@@ -311,8 +311,16 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
311
311
err )
312
312
}
313
313
314
+ // We need to make sure we use the real scid for public confirmed
315
+ // zero-conf channels.
316
+ shortChanID := channel .ShortChanID ()
317
+ isPublic := channel .ChannelFlags & lnwire .FFAnnounceChannel != 0
318
+ if isPublic && channel .IsZeroConf () && channel .ZeroConfConfirmed () {
319
+ shortChanID = channel .ZeroConfRealScid ()
320
+ }
321
+
314
322
info := & models.ChannelEdgeInfo {
315
- ChannelID : channel . ShortChanID () .ToUint64 (),
323
+ ChannelID : shortChanID .ToUint64 (),
316
324
ChainHash : channel .ChainHash ,
317
325
Features : featureBuf .Bytes (),
318
326
Capacity : channel .Capacity ,
@@ -328,7 +336,7 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
328
336
// be updated with the new values in the call to processChan below.
329
337
timeLockDelta := uint16 (r .DefaultRoutingPolicy .TimeLockDelta )
330
338
edge := & models.ChannelEdgePolicy {
331
- ChannelID : channel . ShortChanID () .ToUint64 (),
339
+ ChannelID : shortChanID .ToUint64 (),
332
340
LastUpdate : timestamp ,
333
341
TimeLockDelta : timeLockDelta ,
334
342
ChannelFlags : channelFlags ,
0 commit comments