From 6dc43ad253da247a5bcd8f8a90312ceb39e67e5c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 19 Jan 2023 20:42:23 -0800 Subject: [PATCH] cmd/lncli: add new taproot channel type for openchannel --- cmd/lncli/cmd_open_channel.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/lncli/cmd_open_channel.go b/cmd/lncli/cmd_open_channel.go index b08fbabc6..28e1b4b2a 100644 --- a/cmd/lncli/cmd_open_channel.go +++ b/cmd/lncli/cmd_open_channel.go @@ -59,8 +59,9 @@ Signed base64 encoded PSBT or hex encoded raw wire TX (or path to file): ` // of memory issues or other weird errors. psbtMaxFileSize = 1024 * 1024 - channelTypeTweakless = "tweakless" - channelTypeAnchors = "anchors" + channelTypeTweakless = "tweakless" + channelTypeAnchors = "anchors" + channelTypeSimpleTaproot = "taproot" ) // TODO(roasbeef): change default number of confirmations. @@ -253,8 +254,9 @@ var openChannelCommand = cli.Command{ cli.StringFlag{ Name: "channel_type", Usage: fmt.Sprintf("(optional) the type of channel to "+ - "propose to the remote peer (%q, %q)", - channelTypeTweakless, channelTypeAnchors), + "propose to the remote peer (%q, %q, %q)", + channelTypeTweakless, channelTypeAnchors, + channelTypeSimpleTaproot), }, cli.BoolFlag{ Name: "zero_conf", @@ -443,6 +445,8 @@ func openChannel(ctx *cli.Context) error { req.CommitmentType = lnrpc.CommitmentType_STATIC_REMOTE_KEY case channelTypeAnchors: req.CommitmentType = lnrpc.CommitmentType_ANCHORS + case channelTypeSimpleTaproot: + req.CommitmentType = lnrpc.CommitmentType_SIMPLE_TAPROOT default: return fmt.Errorf("unsupported channel type %v", channelType) }