Browse Source

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
ppa-prep
Michael Schmoock 4 years ago
committed by neil saitug
parent
commit
36499e6779
  1. 7
      lightningd/channel.c

7
lightningd/channel.c

@ -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 */

Loading…
Cancel
Save