mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
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:
@@ -264,6 +264,9 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg)
|
||||
if (!channel->shutdown_wrong_funding)
|
||||
channel->shutdown_wrong_funding = wrong_funding;
|
||||
|
||||
/* We now watch the "wrong" funding, in case we spend it. */
|
||||
channel_watch_wrong_funding(ld, channel);
|
||||
|
||||
/* TODO(cdecker) Selectively save updated fields to DB */
|
||||
wallet_channel_save(ld->wallet, channel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user