mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: clean up subds before freeing HTLCs.
Otherwise we get weird effects, as htlcs are being freed: ``` 2022-01-26T05:07:37.8774610Z lightningd-1: 2022-01-26T04:47:48.770Z DEBUG 030eeb52087b9dbb27b7aec79ca5249369f6ce7b20a5684ce38d9f4595a21c2fda-chan#8: Failing HTLC 18446744073709551615 due to peer death 2022-01-26T05:07:37.8775287Z lightningd-1: 2022-01-26T04:47:48.770Z **BROKEN** 030eeb52087b9dbb27b7aec79ca5249369f6ce7b20a5684ce38d9f4595a21c2fda-chan#8: Neither origin nor in? ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -570,10 +570,15 @@ static void onchain_error(struct channel *channel,
|
||||
bool warning UNUSED,
|
||||
const u8 *err_for_them UNUSED)
|
||||
{
|
||||
channel_set_owner(channel, NULL);
|
||||
|
||||
/* This happens on shutdown: fine */
|
||||
if (channel->peer->ld->state == LD_STATE_SHUTDOWN)
|
||||
return;
|
||||
|
||||
/* FIXME: re-launch? */
|
||||
log_broken(channel->log, "%s", desc);
|
||||
channel_set_billboard(channel, true, desc);
|
||||
channel_set_owner(channel, NULL);
|
||||
}
|
||||
|
||||
/* With a reorg, this can get called multiple times; each time we'll kill
|
||||
|
||||
Reference in New Issue
Block a user