From 3cc8e8112146b915e43655152b1719ddb1dd71e4 Mon Sep 17 00:00:00 2001 From: Carla Kirk-Cohen Date: Wed, 16 Nov 2022 10:33:20 -0500 Subject: [PATCH 1/2] lncli/bugfix: use int64slice for update node announcement features As is, we'll never get any add/remove features because the flag is set as an int 64 slice but accessed as an int slice (which has no value, and the cli doesn't fail if the flag doesn't exist). --- cmd/lncli/peersrpc_active.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/peersrpc_active.go b/cmd/lncli/peersrpc_active.go index 094dde1c3..1636bc99a 100644 --- a/cmd/lncli/peersrpc_active.go +++ b/cmd/lncli/peersrpc_active.go @@ -126,7 +126,7 @@ func updateNodeAnnouncement(ctx *cli.Context) error { if ctx.IsSet("feature_bit_add") { change = true - for _, feature := range ctx.IntSlice("feature_bit_add") { + for _, feature := range ctx.Int64Slice("feature_bit_add") { action := &peersrpc.UpdateFeatureAction{ Action: peersrpc.UpdateAction_ADD, FeatureBit: lnrpc.FeatureBit(feature), @@ -137,7 +137,7 @@ func updateNodeAnnouncement(ctx *cli.Context) error { if ctx.IsSet("feature_bit_remove") { change = true - for _, feature := range ctx.IntSlice("feature_bit_remove") { + for _, feature := range ctx.Int64Slice("feature_bit_remove") { action := &peersrpc.UpdateFeatureAction{ Action: peersrpc.UpdateAction_REMOVE, FeatureBit: lnrpc.FeatureBit(feature), From 03a61617f881ce661de923eb81c982a0554117c3 Mon Sep 17 00:00:00 2001 From: Carla Kirk-Cohen Date: Thu, 17 Nov 2022 15:40:00 -0500 Subject: [PATCH 2/2] release-notes: add UpdateNodeAnnouncement changes --- docs/release-notes/release-notes-0.16.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes/release-notes-0.16.0.md b/docs/release-notes/release-notes-0.16.0.md index 7e2c1d5e4..ad4796de6 100644 --- a/docs/release-notes/release-notes-0.16.0.md +++ b/docs/release-notes/release-notes-0.16.0.md @@ -130,6 +130,10 @@ current gossip sync query status. * [A bug has been fixed which could cause `lnd` to crash when parsing a malformed HTLC intercept message](https://github.com/lightningnetwork/lnd/pull/7392). +* [A bug](https://github.com/lightningnetwork/lnd/pull/7408) in the + `updatenodeannouncement` peers cli which did not allow setting/ + unsetting of feature bits also has been fixed. + ## Wallet * [Allows Taproot public keys and tap scripts to be imported as watch-only