Skip to content

Commit 76fb9af

Browse files
committed
localchans: bugfix so that we always use the correct chanID
1 parent 040eddf commit 76fb9af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

routing/localchans/manager.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,14 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
311311
err)
312312
}
313313

314+
// We need to make sure we use the real scid for zero-conf channels.
315+
shortChanID := channel.ShortChanID()
316+
if channel.IsZeroConf() && channel.ZeroConfConfirmed() {
317+
shortChanID = channel.ZeroConfRealScid()
318+
}
319+
314320
info := &models.ChannelEdgeInfo{
315-
ChannelID: channel.ShortChanID().ToUint64(),
321+
ChannelID: shortChanID.ToUint64(),
316322
ChainHash: channel.ChainHash,
317323
Features: featureBuf.Bytes(),
318324
Capacity: channel.Capacity,

0 commit comments

Comments
 (0)