clightning-sane: default to "status" action when none specified

This commit is contained in:
2025-01-09 04:04:51 +00:00
parent ff9b1538fe
commit fa5fcaa2bf

View File

@@ -769,13 +769,18 @@ def main():
rpc = RpcHelper(LightningRpc(RPC_FILE))
if args.action == "status":
action = getattr(args, "action", None)
if action is None:
show_status(rpc)
if action == "status":
show_status(rpc, full=args.full)
if args.action == "loop":
if action == "loop":
balance_loop(rpc, out=args.out, in_=args.in_, amount_msat=int(args.amount), min_msat=int(args.min_msat), max_msat=int(args.max_msat), parallelism=int(args.jobs))
if args.action == "autobalance":
if action == "autobalance":
autobalance(rpc, min_msat=int(args.min_msat), max_msat=int(args.max_msat), parallelism=int(args.jobs))
if __name__ == '__main__':