[Feature request] Add warning if wallet funds are too low to accept new anchor channels
Is your feature request related to a problem? Please describe. Currently, if the wallet balance drops too low, LND can no accept incoming open channel requests. This is buried in the logs.
Describe the solution you'd like A preemptive notice on low wallet funds would be very helpful. Bubbling up the error from LND upwards would be even better, but I assume that's much more complicated.
I am not sure what the amount for too low is. According to Alex Bosworth, 100k sats should be enough to handle incoming open channels. 10k sats would be an absolute minimum for anchor reservation.
Describe alternatives you've considered
Grepping the log on reserved wallet balance invalidated. This is not scaleable, and people miss out on opened channel unknowingly.
Provide examples Maybe superfluous, but this is what happens in the logs:
2021-06-12 13:43:04.059 [INF] FNDG: Recv'd fundingRequest(amt=0.02 BTC, push=0 mSAT, delay=240, pendingId=x) from peer(x)
2021-06-12 13:43:04.060 [INF] CHFD: Performing funding tx coin selection using 0 sat/kw as fee rate
2021-06-12 13:43:04.256 [WRN] CHFD: Unable to find funding output for shim intent: unable to create witness script, no funding keys
2021-06-12 13:43:04.257 [ERR] FNDG: Unable to initialize reservation: reserved wallet balance invalidated
2021-06-12 13:43:04.257 [INF] FNDG: Cancelling funding reservation for node_key=x, chan_id=x
2021-06-12 13:43:04.257 [ERR] FNDG: unable to cancel reservation: no active reservations for peer(x)
This is not my node, this is from a fellow node operator.
I was on the opening side, where it was showing like this:
2021-06-12 14:43:04.675 [ERR] FNDG: received funding error from x: chan_id=x, err=funding failed due to internal error
2021-06-12 14:43:04.675 [INF] FNDG: Initiating fundingRequest(local_amt=0.01 BTC (subtract_fees=false), push_amt=0 mSAT, chain_hash=x, peer=x, dust_limit=0.00000573 BTC, min_confs=1)
2021-06-12 14:43:04.675 [ERR] RPCS: unable to open channel to NodeKey(x): remote canceled funding, possibly timed out: received funding error from x: chan_id=x, err=funding failed due to internal error
2021-06-12 14:43:04.675 [ERR] RPCS: [/lnrpc.Lightning/OpenChannel]: remote canceled funding, possibly timed out: received funding error from x: chan_id=x, err=funding failed due to internal error