Skip to content

Commit 361568e

Browse files
committed
cmd: add --includealleasypeers
1 parent 0f1ae59 commit 361568e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

cmd/loop/liquidity.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,15 @@ var setParamsCommand = &cli.Command{
354354
&cli.StringSliceFlag{
355355
Name: "excludeeasypeer",
356356
Usage: "list of peer pubkeys (hex) to exclude from " +
357-
"easy autoloop channel selection; repeat " +
357+
"easy autoloop channel selection. Repeat " +
358358
"--excludeeasypeer for multiple peers",
359359
},
360+
&cli.BoolFlag{
361+
Name: "includealleasypeers",
362+
Usage: "include all peers back into easy autoloop by " +
363+
"clearing the exclusion list. It cannot be " +
364+
"combined with --excludeeasypeer",
365+
},
360366
&cli.BoolFlag{
361367
Name: "asset_easyautoloop",
362368
Usage: "set to true to enable asset easy autoloop, which " +
@@ -574,6 +580,15 @@ func setParams(ctx context.Context, cmd *cli.Command) error {
574580
flagSet = true
575581
}
576582

583+
// If includealleasypeers is set, clear the entire exclusion list.
584+
if cmd.IsSet("includealleasypeers") {
585+
if cmd.IsSet("excludeeasypeer") {
586+
return fmt.Errorf("includealleasypeers cannot be used with --excludeeasypeer")
587+
}
588+
params.EasyAutoloopExcludedPeers = nil
589+
flagSet = true
590+
}
591+
577592
if cmd.IsSet("excludeeasypeer") {
578593
peers := cmd.StringSlice("excludeeasypeer")
579594
// Reset and set according to a provided list.

0 commit comments

Comments
 (0)