mirror of
https://github.com/ACINQ/eclair.git
synced 2024-11-19 01:43:22 +01:00
148fc673d4
Node operators may disable automatic fee-bumping on their local commit if they don't have anything at stake (no pending HTLCs), which saves fees in most cases. A drawback in that case is that if the commitment doesn't confirm quickly enough, the remote's funds are also locked. This can be an issue for LSPs, where the remote peer doesn't have a good ability to fee-bump commit txs. We give more control to the node operator by letting them fee-bump local commit txs explicitly through the RPC to unblock wallet users funds.
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
# bash completion for eclair-cli
|
|
# copy to /etc/bash_completion.d/
|
|
# created by Stadicus
|
|
|
|
_eclair-cli()
|
|
{
|
|
local cur prev opts cmds
|
|
|
|
# eclair-cli might not be in $PATH
|
|
local eclaircli
|
|
ecli="$1"
|
|
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
case "$cur" in
|
|
-*=*)
|
|
return 0
|
|
;;
|
|
*)
|
|
# works fine, but is too slow at the moment.
|
|
# allopts=$($eclaircli help 2>&1 | awk '$1 ~ /^"/ { sub(/,/, ""); print $1}' | sed 's/[":]//g')
|
|
allopts="getinfo connect open cpfpbumpfees close forceclose bumpforceclose updaterelayfee peers channels channel closedchannels allnodes allchannels allupdates findroute findroutetonode findroutebetweennodes parseinvoice payinvoice sendtonode getsentinfo createinvoice getinvoice listinvoices listpendinginvoices listreceivedpayments getreceivedinfo audit networkfees channelstats"
|
|
|
|
if ! [[ " $allopts " =~ " $prev " ]]; then # prevent double arguments
|
|
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
|
|
opts=${allopts}
|
|
fi
|
|
fi
|
|
|
|
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
|
|
cmds=$($ecli 2>&1 | awk '$1 ~ /^-/ { sub(/,/, ""); print $1}')
|
|
fi
|
|
|
|
COMPREPLY=( $(compgen -W "${cmds} ${opts}" -- ${cur}) )
|
|
esac
|
|
}
|
|
complete -F _eclair-cli eclair-cli
|