diff --git a/lnwallet/btcwallet/btcwallet.go b/lnwallet/btcwallet/btcwallet.go index a29139dbab9..5cd74d87e16 100644 --- a/lnwallet/btcwallet/btcwallet.go +++ b/lnwallet/btcwallet/btcwallet.go @@ -1136,7 +1136,11 @@ func mapRpcclientError(err error) error { case errors.Is(err, chain.ErrMempoolMinFeeNotMet), errors.Is(err, chain.ErrMinRelayFeeNotMet): - return fmt.Errorf("%w: %v", lnwallet.ErrMempoolFee, err.Error()) + return fmt.Errorf("%w: %v. The cooperative close transaction " + + "was created but not accepted into the mempool due to low " + + "fees. You may need to use 'lncli wallet bumpfee' to increase "+ + "the fee and get the transaction confirmed", + lnwallet.ErrMempoolFee, err.Error()) } return err diff --git a/rpcserver.go b/rpcserver.go index d3d3c518014..742aae59a19 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2853,9 +2853,20 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, "offline channel with chan_point=%v", chanPoint) + // Check if the channel is already closed or has a pending close tx. + if channel.HasChanStatus( + channeldb.ChanStatusCoopBroadcasted) { + return fmt.Errorf("channel is already " + + "in the process of closing. Check " + + "'lncli pendingchannels' for status. " + + "If the close transaction is not " + + "confirmed, you may need to use " + + "'lncli wallet bumpfee'") + } + return fmt.Errorf("unable to gracefully close "+ - "channel while peer is offline (try "+ - "force closing it instead): %v", err) + "channel while peer is offline " + + "(try force closing it instead): %v", err) } }