Skip to content

Commit

Permalink
localchans: bugfix so that we always use the correct chanID
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggie1984 committed Dec 20, 2024
1 parent 1dfb5a0 commit f9b42cb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion routing/localchans/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,16 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
err)
}

// We need to make sure we use the real scid for public confirmed
// zero-conf channels.
shortChanID := channel.ShortChanID()
isPublic := channel.ChannelFlags&lnwire.FFAnnounceChannel != 0
if isPublic && channel.IsZeroConf() && channel.ZeroConfConfirmed() {
shortChanID = channel.ZeroConfRealScid()
}

info := &models.ChannelEdgeInfo{
ChannelID: channel.ShortChanID().ToUint64(),
ChannelID: shortChanID.ToUint64(),
ChainHash: channel.ChainHash,
Features: featureBuf.Bytes(),
Capacity: channel.Capacity,
Expand Down

0 comments on commit f9b42cb

Please sign in to comment.