diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 755a06f9d..902d5b874 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -822,6 +822,7 @@ static void NON_NULL_ARGS(1, 2, 4, 5) json_add_channel(struct command *cmd, struct amount_sat peer_funded_sats; const struct peer_update *peer_update; u32 feerate; + bool has_valid_inflights; json_object_start(response, key); json_add_node_id(response, "peer_id", &peer->id); @@ -910,7 +911,15 @@ static void NON_NULL_ARGS(1, 2, 4, 5) json_add_channel(struct command *cmd, json_add_txid(response, "funding_txid", &channel->funding.txid); json_add_num(response, "funding_outnum", channel->funding.n); + has_valid_inflights = false; if (!list_empty(&channel->inflights)) { + struct channel_inflight *inflight; + list_for_each(&channel->inflights, inflight, list) + if (!inflight->splice_locked_memonly) + has_valid_inflights = true; + } + + if (has_valid_inflights) { struct channel_inflight *initial, *inflight; u32 last_feerate, next_feerate; @@ -942,6 +951,8 @@ static void NON_NULL_ARGS(1, 2, 4, 5) json_add_channel(struct command *cmd, json_array_start(response, "inflight"); list_for_each(&channel->inflights, inflight, list) { struct bitcoin_txid txid; + if (inflight->splice_locked_memonly) + continue; json_object_start(response, NULL); json_add_txid(response, "funding_txid", @@ -3214,6 +3225,8 @@ static struct command_result *json_sign_last_tx(struct command *cmd, json_array_start(response, "inflights"); list_for_each(&channel->inflights, inflight, list) { + if (inflight->splice_locked_memonly) + continue; tx = sign_last_tx(cmd, channel, inflight->last_tx, &inflight->last_sig); json_object_start(response, NULL);