cmd: add --includealleasypeers

This commit is contained in:
Slyghtning 2025-10-09 11:54:26 +02:00
parent bb8ee54817
commit 7fc07ae99b
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF

View file

@ -357,6 +357,12 @@ var setParamsCommand = &cli.Command{
"easy autoloop channel selection; repeat " +
"--easyautoloop_excludepeer for multiple peers",
},
&cli.BoolFlag{
Name: "easyatutoloop_includeallpeers",
Usage: "include all peers back into easy autoloop by " +
"clearing the exclusion list. It cannot be " +
"combined with --easyautoloop_excludepeer",
},
&cli.BoolFlag{
Name: "asset_easyautoloop",
Usage: "set to true to enable asset easy autoloop, which " +
@ -574,6 +580,18 @@ func setParams(ctx context.Context, cmd *cli.Command) error {
flagSet = true
}
// If easyatutoloop_includeallpeers is set, clear the entire exclusion
// list.
if cmd.IsSet("easyatutoloop_includeallpeers") {
if cmd.IsSet("easyautoloop_excludepeer") {
return fmt.Errorf("easyatutoloop_includeallpeers " +
"cannot be used with " +
"--easyautoloop_excludepeer")
}
params.EasyAutoloopExcludedPeers = nil
flagSet = true
}
if cmd.IsSet("easyautoloop_excludepeer") {
peers := cmd.StringSlice("easyautoloop_excludepeer")
// Reset and set according to a provided list.