Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lnwallet/btcwallet/btcwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down