What changed, and why it matters
This commit simply deletes unused code in the lncli command-line tool. A variable named chanPoints was being built up from channel backup data but never read or used afterward. Removing it has no functional or security effect.
No security action needed. Treat as routine code-quality cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes a local variable and a loop inside exportChanBackup() in cmd/commands/commands.go. The loop converted channel points from a backup response into strings and appended them to chanPoints, but nothing ever referenced chanPoints. The function now just prints the raw backup response as JSON. This is a pure dead-code cleanup with no behavior change.
Changed components
cmd/commands/commands.golncli exportChanBackup commandInspect captured patch +0 / −13
diff --git a/cmd/commands/commands.go b/cmd/commands/commands.go
index fd8dc20..f0b4bf6 100644
--- a/cmd/commands/commands.go
+++ b/cmd/commands/commands.go
@@ -2972,19 +2972,6 @@ func exportChanBackup(ctx *cli.Context) error {
// TODO(roasbeef): support for export | restore ?
- var chanPoints []string
- for _, chanPoint := range chanBackup.MultiChanBackup.ChanPoints {
- txid, err := chainhash.NewHash(chanPoint.GetFundingTxidBytes())
- if err != nil {
- return err
- }
-
- chanPoints = append(chanPoints, wire.OutPoint{
- Hash: *txid,
- Index: chanPoint.OutputIndex,
- }.String())
- }
-
printRespJSON(chanBackup)
return nil
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.