chore: allow 0 failure amount on import mission control

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

No files matched your search

+3 -2
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)