daemon: don't code check for cleared commits in the main loop, use pending queue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-03 11:03:20 +09:30
parent 33a477d65d
commit bccd10c6d8
3 changed files with 24 additions and 7 deletions

View File

@@ -209,6 +209,9 @@ void setup_listeners(struct lightningd_state *dstate, unsigned int portnum);
/* Populates very first peer->{us,them}.commit->{tx,cstate} */
bool setup_first_commit(struct peer *peer);
/* Call this after commit changes, or revocation accepted/sent. */
void peer_check_if_cleared(struct peer *peer);
void peer_add_htlc_expiry(struct peer *peer,
const struct abs_locktime *expiry);