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 19, 2024
1 parent 040eddf commit 76fb9af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion routing/localchans/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,14 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
err)
}

// We need to make sure we use the real scid for zero-conf channels.
shortChanID := channel.ShortChanID()
if 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 76fb9af

Please sign in to comment.