Skip to content

Commit ebf98c6

Browse files
committed
chanacceptor: add simple taproot channels
1 parent a1b0a7e commit ebf98c6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

chanacceptor/rpcacceptor.go

+25
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ func (r *RPCAcceptor) sendAcceptRequests(errChan chan error,
249249
acceptRequests := make(map[[32]byte]*chanAcceptInfo)
250250

251251
for {
252+
//nolint:lll
252253
select {
253254
// Consume requests passed to us from our Accept() function and
254255
// send them into our stream.
@@ -331,6 +332,30 @@ func (r *RPCAcceptor) sendAcceptRequests(errChan chan error,
331332
):
332333
commitmentType = lnrpc.CommitmentType_ANCHORS
333334

335+
case channelFeatures.OnlyContains(
336+
lnwire.SimpleTaprootChannelsRequiredStaging,
337+
lnwire.ZeroConfRequired,
338+
lnwire.ScidAliasRequired,
339+
):
340+
commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT
341+
342+
case channelFeatures.OnlyContains(
343+
lnwire.SimpleTaprootChannelsRequiredStaging,
344+
lnwire.ZeroConfRequired,
345+
):
346+
commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT
347+
348+
case channelFeatures.OnlyContains(
349+
lnwire.SimpleTaprootChannelsRequiredStaging,
350+
lnwire.ScidAliasRequired,
351+
):
352+
commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT
353+
354+
case channelFeatures.OnlyContains(
355+
lnwire.SimpleTaprootChannelsRequiredStaging,
356+
):
357+
commitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT
358+
334359
case channelFeatures.OnlyContains(
335360
lnwire.StaticRemoteKeyRequired,
336361
):

0 commit comments

Comments
 (0)