mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-18 13:08:28 +02:00
loop: add swap sizes to autoloop set params command
This commit is contained in:
parent
74f2c96810
commit
87fd63713f
1 changed files with 20 additions and 0 deletions
|
|
@ -248,6 +248,16 @@ var setParamsCommand = cli.Command{
|
|||
"dispatched swaps that we allow to be in " +
|
||||
"flight",
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "minamt",
|
||||
Usage: "the minimum amount in satoshis that the " +
|
||||
"autoloop client will dispatch per-swap",
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "maxamt",
|
||||
Usage: "the maximum amount in satoshis that the " +
|
||||
"autoloop client will dispatch per-swap",
|
||||
},
|
||||
},
|
||||
Action: setParams,
|
||||
}
|
||||
|
|
@ -348,6 +358,16 @@ func setParams(ctx *cli.Context) error {
|
|||
flagSet = true
|
||||
}
|
||||
|
||||
if ctx.IsSet("minamt") {
|
||||
params.MinSwapAmount = ctx.Uint64("minamt")
|
||||
flagSet = true
|
||||
}
|
||||
|
||||
if ctx.IsSet("maxamt") {
|
||||
params.MaxSwapAmount = ctx.Uint64("maxamt")
|
||||
flagSet = true
|
||||
}
|
||||
|
||||
if !flagSet {
|
||||
return fmt.Errorf("at least one flag required to set params")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue