lightningd: allow outgoing_scid without outgoing amount.

This (will) happen if they ask is to forward to an unknown scid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-07-09 12:53:23 +09:30
parent 980f3bda1f
commit d6afb0cd8d

View file

@ -2779,7 +2779,7 @@ void json_format_forwarding_object(struct json_stream *response,
"in_msatoshi", "in_msat");
/* These can be unset (aka zero) if we failed before channel lookup */
if (cur->channel_out.u64 != 0) {
if (!amount_msat_eq(cur->msat_out, AMOUNT_MSAT(0))) {
json_add_amount_msat_compat(response,
cur->msat_out,
"out_msatoshi", "out_msat");