mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
cmd: add --includealleasypeers
This commit is contained in:
parent
bb8ee54817
commit
7fc07ae99b
1 changed files with 18 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue