chore: allow 0 failure amount on import mission control

This commit is contained in:
Bufo
2024-06-03 11:28:26 +02:00
parent 613bfc07fb
commit 4a3af519b8
3 changed files with 29 additions and 9 deletions

View File

@@ -66,8 +66,9 @@ func importMissionControl(ctx *cli.Context) error {
return fmt.Errorf("please provide amount in msat: %w", err)
}
if amt <= 0 {
return errors.New("amount must be >0")
// Allow 0 value as failure amount.
if !ctx.IsSet("failure") && amt <= 0 {
return errors.New("success amount must be >0")
}
client := routerrpc.NewRouterClient(conn)