daemon: implement HTLC expiry.

We do the simplest thing: a timer goes off, and we check all HTLCs for
one which has expired more than 30 seconds ago.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:45:28 +10:30
parent 1018823f97
commit b76858c1a1
4 changed files with 139 additions and 2 deletions

View File

@@ -132,4 +132,7 @@ void make_commit_txs(const tal_t *ctx,
const struct channel_state *cstate,
struct bitcoin_tx **ours, struct bitcoin_tx **theirs);
void peer_add_htlc_expiry(struct peer *peer,
const struct abs_locktime *expiry);
#endif /* LIGHTNING_DAEMON_PEER_H */