Skip to content

Commit 7fc07ae

Browse files
committed
cmd: add --includealleasypeers
1 parent bb8ee54 commit 7fc07ae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cmd/loop/liquidity.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ var setParamsCommand = &cli.Command{
357357
"easy autoloop channel selection; repeat " +
358358
"--easyautoloop_excludepeer for multiple peers",
359359
},
360+
&cli.BoolFlag{
361+
Name: "easyatutoloop_includeallpeers",
362+
Usage: "include all peers back into easy autoloop by " +
363+
"clearing the exclusion list. It cannot be " +
364+
"combined with --easyautoloop_excludepeer",
365+
},
360366
&cli.BoolFlag{
361367
Name: "asset_easyautoloop",
362368
Usage: "set to true to enable asset easy autoloop, which " +
@@ -574,6 +580,18 @@ func setParams(ctx context.Context, cmd *cli.Command) error {
574580
flagSet = true
575581
}
576582

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

0 commit comments

Comments
 (0)