loop: add swap sizes to autoloop set params command

pull/321/head
carla 3 years ago
parent 74f2c96810
commit 87fd63713f
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91

@ -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…
Cancel
Save