routing+funding: add new makeFundingScript to support reg and taproot channels

In this commit, we start to set _internally_ a new feature bit in the
channel announcements we generate. As these taproot channels can only be
unadvertised, this will never actually leak to the public network. The
funding manager will then set this field to allow the router to properly
validate these channels.
This commit is contained in:
Olaoluwa Osuntokun committed 2023-08-22 16:32:10 -07:00
1 parent 15978a8691
commit 7d7513aa3c
2 files changed
+76 -10

No files matched your search

+12
View File
@@ -4068,6 +4068,18 @@ func (f *Manager) newChanAnnouncement(localPubKey,
ChainHash: chainHash,
}
// If this is a taproot channel, then we'll set a special bit in the
// feature vector to indicate to the routing layer that this needs a
// slightly different type of validation.
//
// TODO(roasbeef): temp, remove after gossip 1.5
if chanType.IsTaproot() {
log.Debugf("Applying taproot feature bit to "+
"ChannelAnnouncement for %v", chanID)
chanAnn.Features.Set(lnwire.SimpleTaprootChannelsRequired)
}
// The chanFlags field indicates which directed edge of the channel is
// being updated within the ChannelUpdateAnnouncement announcement
// below. A value of zero means it's the edge of the "first" node and 1