File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -994,6 +994,11 @@ var closeAllChannelsCommand = cli.Command{
994994 "sat/vbyte that should be used when crafting " +
995995 "the closing transactions" ,
996996 },
997+ cli.BoolFlag {
998+ Name : "s, skip_confirmation" ,
999+ Usage : "Skip the confirmation prompt and close all " +
1000+ "channels immediately" ,
1001+ },
9971002 },
9981003 Action : actionDecorator (closeAllChannels ),
9991004}
@@ -1012,6 +1017,11 @@ func closeAllChannels(ctx *cli.Context) error {
10121017 return err
10131018 }
10141019
1020+ prompt := "Do you really want to close ALL channels? (yes/no): "
1021+ if ! ctx .Bool ("skip_confirmation" ) && ! promptForConfirmation (prompt ) {
1022+ return errors .New ("action aborted by user" )
1023+ }
1024+
10151025 listReq := & lnrpc.ListChannelsRequest {}
10161026 openChannels , err := client .ListChannels (ctxc , listReq )
10171027 if err != nil {
You can’t perform that action at this time.
0 commit comments