onchaind: see closes when wrong_funding shutdowns are used.

Fairly easy to do, though we also have to add the watch when we load
from the database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-03-16 06:56:13 +10:30
parent b62706aa01
commit a1b43a3653
4 changed files with 20 additions and 3 deletions

View File

@@ -87,6 +87,8 @@ void activate_peers(struct lightningd *ld);
void drop_to_chain(struct lightningd *ld, struct channel *channel, bool cooperative);
void channel_watch_funding(struct lightningd *ld, struct channel *channel);
/* If this channel has a "wrong funding" shutdown, watch that too. */
void channel_watch_wrong_funding(struct lightningd *ld, struct channel *channel);
struct amount_msat channel_amount_receivable(const struct channel *channel);