Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix createmissingedge #9383

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions 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(),
ziggie1984 marked this conversation as resolved.
Show resolved Hide resolved
ChainHash: channel.ChainHash,
Features: featureBuf.Bytes(),
Capacity: channel.Capacity,
Expand All @@ -328,7 +336,7 @@ func (r *Manager) createEdge(channel *channeldb.OpenChannel,
// be updated with the new values in the call to processChan below.
timeLockDelta := uint16(r.DefaultRoutingPolicy.TimeLockDelta)
edge := &models.ChannelEdgePolicy{
ChannelID: channel.ShortChanID().ToUint64(),
ChannelID: shortChanID.ToUint64(),
LastUpdate: timestamp,
TimeLockDelta: timeLockDelta,
ChannelFlags: channelFlags,
Expand Down
Loading