Repository: lightningnetwork/lnd (language: go)

Issue:
[bug]: lncli wallet bumpclosefee => intercept already started
### Background

When running lncli wallet bumpclosefee on a standard lnd/lncli build, I get 'intercept already started' as an error message
### Your environment

* `lnd`: current master 478b01267289fa913d1be1e1357b2c4f582de7d3
* which operating system (`uname -a` on *Nix): `Linux murphy 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`
* version of `btcd`, `bitcoind`, or other backend: bitcoind 23.0

### Steps to reproduce

Run lncli wallet bumpclosefee with superficially valid arguments (channel point should be parseable but doesn't need to belong to a channel waiting close)

### Expected behaviour

Fee bump or an error message like "channel not found"

### Actual behaviour

`intercept already started`

### Thoughts

Both `bumpCloseFee` and its callee `getWaitingCloseCommitments` do getContext(), which seems to set up an interceptor and complain if it's done twice. I've tried a change that passes bumpCloseFee's getContext() result into `getWaitingCloseCommitments`, and got expected behavior from lncli instead of "interceptor already started".



Discussion / hints:
Can confirm that this is indeed a bug in lncli. Would you like to open a PR with your fixes?
@sputn1ck I'm unsure if just passing down the context is the right thing to do here. I'm also unsure if there are other places with double getContext, and maybe instead getContext should be fixed to not set up a second interceptor.

If you can assure me that passing down ctxc is conceptually right, than I'll go on with PR. 
To me it seems like the right fix here as `getWaitingCloseCommitments` is only called by `BumpFee`. I'm happy to take the blame if it is conceptually wrong 😄 

Fix patch:
diff --git a/cmd/lncli/walletrpc_active.go b/cmd/lncli/walletrpc_active.go
index 5f3d082bf4..34802f1a7b 100644
--- a/cmd/lncli/walletrpc_active.go
+++ b/cmd/lncli/walletrpc_active.go
@@ -5,6 +5,7 @@ package main
 
 import (
 	"bytes"
+	"context"
 	"encoding/base64"
 	"encoding/hex"
 	"encoding/json"
@@ -320,7 +321,9 @@ func bumpCloseFee(ctx *cli.Context) error {
 	defer cleanUp()
 
 	// Fetch waiting close channel commitments.
-	commitments, err := getWaitingCloseCommitments(client, channelPoint)
+	commitments, err := getWaitingCloseCommitments(
+		ctxc, client, channelPoint,
+	)
 	if err != nil {
 		return err
 	}
@@ -379,11 +382,9 @@ func bumpCloseFee(ctx *cli.Context) error {
 	return nil
 }
 
-func getWaitingCloseCommitments(client lnrpc.LightningClient,
-	channelPoint string) (*lnrpc.PendingChannelsResponse_Commitments,
-	error) {
-
-	ctxc := getContext()
+func getWaitingCloseCommitments(ctxc context.Context,
+	client lnrpc.LightningClient, channelPoint string) (
+	*lnrpc.PendingChannelsResponse_Commitments, error) {
 
 	req := &lnrpc.PendingChannelsRequest{}
 	resp, err := client.PendingChannels(ctxc, req)


Test patch: