mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
protocol: split message update_remove_htlc into update_timedout_htlc and update_routefail_htlc, remove update_remove_htlc_delay.
For the moment, there's no way to remove an in-progress HTLC before it's timed out. The other side can remove it with a routefail, but you can't push for it to be removed. We may add that later, but by definition it's only a polited request, and normally we should rely on timeouts. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
16
pkt.h
16
pkt.h
@@ -105,7 +105,7 @@ struct pkt *update_htlc_add_pkt(const tal_t *ctx,
|
||||
u32 abs_locktime_seconds);
|
||||
|
||||
/**
|
||||
* update_htlc_complete_pkt - create an update message removing a HTLC
|
||||
* update_htlc_complete_pkt - create an update message completing a HTLC
|
||||
* @ctx: tal context to allocate off.
|
||||
* @revocation_hash: the revocation hash for the next commitment tx.
|
||||
* @rval: the r value for the HTLC
|
||||
@@ -115,15 +115,25 @@ struct pkt *update_htlc_complete_pkt(const tal_t *ctx,
|
||||
const struct sha256 *rval);
|
||||
|
||||
/**
|
||||
* update_htlc_remove_pkt - create an update message completing a HTLC
|
||||
* update_htlc_timedout_pkt - create an update message removing a HTLC
|
||||
* @ctx: tal context to allocate off.
|
||||
* @revocation_hash: the revocation hash for the next commitment tx.
|
||||
* @htlc_rhash: the hash of the htlc secret.
|
||||
*/
|
||||
struct pkt *update_htlc_remove_pkt(const tal_t *ctx,
|
||||
struct pkt *update_htlc_timedout_pkt(const tal_t *ctx,
|
||||
const struct sha256 *revocation_hash,
|
||||
const struct sha256 *htlc_rhash);
|
||||
|
||||
/**
|
||||
* update_htlc_routefail_pkt - create an update message removing a HTLC
|
||||
* @ctx: tal context to allocate off.
|
||||
* @revocation_hash: the revocation hash for the next commitment tx.
|
||||
* @htlc_rhash: the hash of the htlc secret.
|
||||
*/
|
||||
struct pkt *update_htlc_routefail_pkt(const tal_t *ctx,
|
||||
const struct sha256 *revocation_hash,
|
||||
const struct sha256 *htlc_rhash);
|
||||
|
||||
/**
|
||||
* update_accept_pkt - create an update_accept message
|
||||
* @ctx: tal context to allocate off.
|
||||
|
||||
Reference in New Issue
Block a user