mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
df: helper to find the last (most recent) inflight for a channel
This commit is contained in:
parent
628f9df320
commit
95e81ce82c
@ -56,6 +56,23 @@ unsaved_channel_disconnect(struct channel *channel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME: remove when used */
|
||||||
|
struct channel_inflight *
|
||||||
|
channel_current_inflight(struct channel *channel);
|
||||||
|
struct channel_inflight *
|
||||||
|
channel_current_inflight(struct channel *channel)
|
||||||
|
{
|
||||||
|
struct channel_inflight *inflight;
|
||||||
|
/* The last inflight should always be the one in progress */
|
||||||
|
inflight = list_tail(&channel->inflights,
|
||||||
|
struct channel_inflight,
|
||||||
|
list);
|
||||||
|
if (inflight)
|
||||||
|
assert(bitcoin_txid_eq(&channel->funding_txid,
|
||||||
|
&inflight->funding->txid));
|
||||||
|
return inflight;
|
||||||
|
}
|
||||||
|
|
||||||
static void handle_signed_psbt(struct lightningd *ld,
|
static void handle_signed_psbt(struct lightningd *ld,
|
||||||
struct subd *dualopend,
|
struct subd *dualopend,
|
||||||
const struct wally_psbt *psbt,
|
const struct wally_psbt *psbt,
|
||||||
|
Loading…
Reference in New Issue
Block a user