mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
fix: closer set to remote for onchain settlement
Incase we have been offline while a channel was force closed on us we now set the 'closer' to 'remote' instead of null because this is by far the most probable reason. Changelog-None
This commit is contained in:
committed by
neil saitug
parent
3e42d08c89
commit
36499e6779
@@ -434,9 +434,10 @@ void channel_set_state(struct channel *channel,
|
||||
|
||||
/* set closer, if known */
|
||||
if (state > CHANNELD_NORMAL && channel->closer == NUM_SIDES) {
|
||||
if (reason == REASON_LOCAL) channel->closer = LOCAL;
|
||||
if (reason == REASON_USER) channel->closer = LOCAL;
|
||||
if (reason == REASON_REMOTE) channel->closer = REMOTE;
|
||||
if (reason == REASON_LOCAL) channel->closer = LOCAL;
|
||||
if (reason == REASON_USER) channel->closer = LOCAL;
|
||||
if (reason == REASON_REMOTE) channel->closer = REMOTE;
|
||||
if (reason == REASON_ONCHAIN) channel->closer = REMOTE;
|
||||
}
|
||||
|
||||
/* use or update state_change_cause, if known */
|
||||
|
||||
Reference in New Issue
Block a user