core-lightning/channeld/inflight.h
Dusty Daemon a6a9e5b1e3 splice: Reestablish when commit or sig sends fail
Adds tests for when the connection fails during
1) splice tx_signature
2) splice commitment_signed

Fleshed out the reestablish flow for these two cases and implemented the fixes to make these reestablish flows work.

Part of this work required changing commit process for splices: Now we send a single commit_part for the splice where previously we sent all commits, and accordingly, we no longer revoke in response.

Changelog-Fixed: Implemented splicing restart logic for tx_signature and commitment_signed. Splice commitments are reworked in a manner incompatible with the last version.
2023-11-20 07:35:22 +01:00

28 lines
738 B
C

#ifndef LIGHTNING_CHANNELD_INFLIGHT_H
#define LIGHTNING_CHANNELD_INFLIGHT_H
#include "config.h"
#include <bitcoin/tx.h>
#include <common/amount.h>
struct inflight {
struct bitcoin_outpoint outpoint;
struct amount_sat amnt;
bool remote_tx_sigs;
struct wally_psbt *psbt;
s64 splice_amnt;
struct bitcoin_tx *last_tx;
/* last_sig is assumed valid if last_tx is set */
struct bitcoin_signature last_sig;
bool i_am_initiator;
bool force_sign_first;
bool is_locked;
};
struct inflight *fromwire_inflight(const tal_t *ctx, const u8 **cursor, size_t *max);
void towire_inflight(u8 **pptr, const struct inflight *inflight);
void copy_inflight(struct inflight *dest, struct inflight *src);
#endif /* LIGHTNING_CHANNELD_INFLIGHT_H */