Skip to content

Commit 87fd637

Browse files
committed
loop: add swap sizes to autoloop set params command
1 parent 74f2c96 commit 87fd637

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

cmd/loop/liquidity.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,16 @@ var setParamsCommand = cli.Command{
248248
"dispatched swaps that we allow to be in " +
249249
"flight",
250250
},
251+
cli.Uint64Flag{
252+
Name: "minamt",
253+
Usage: "the minimum amount in satoshis that the " +
254+
"autoloop client will dispatch per-swap",
255+
},
256+
cli.Uint64Flag{
257+
Name: "maxamt",
258+
Usage: "the maximum amount in satoshis that the " +
259+
"autoloop client will dispatch per-swap",
260+
},
251261
},
252262
Action: setParams,
253263
}
@@ -348,6 +358,16 @@ func setParams(ctx *cli.Context) error {
348358
flagSet = true
349359
}
350360

361+
if ctx.IsSet("minamt") {
362+
params.MinSwapAmount = ctx.Uint64("minamt")
363+
flagSet = true
364+
}
365+
366+
if ctx.IsSet("maxamt") {
367+
params.MaxSwapAmount = ctx.Uint64("maxamt")
368+
flagSet = true
369+
}
370+
351371
if !flagSet {
352372
return fmt.Errorf("at least one flag required to set params")
353373
}

0 commit comments

Comments
 (0)