|
|
@ -261,16 +261,8 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg) |
|
|
|
wallet_channel_save(ld->wallet, channel); |
|
|
|
} |
|
|
|
|
|
|
|
static void channel_fail_fallen_behind(struct channel *channel, const u8 *msg) |
|
|
|
void channel_fallen_behind(struct channel *channel, const u8 *msg) |
|
|
|
{ |
|
|
|
if (!fromwire_channeld_fail_fallen_behind(channel, msg, |
|
|
|
cast_const2(struct pubkey **, |
|
|
|
&channel->future_per_commitment_point))) { |
|
|
|
channel_internal_error(channel, |
|
|
|
"bad channel_fail_fallen_behind %s", |
|
|
|
tal_hex(tmpctx, msg)); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
/* per_commitment_point is NULL if option_static_remotekey, but we
|
|
|
|
* use its presence as a flag so set it any valid key in that case. */ |
|
|
@ -293,6 +285,21 @@ static void channel_fail_fallen_behind(struct channel *channel, const u8 *msg) |
|
|
|
"Awaiting unilateral close"); |
|
|
|
} |
|
|
|
|
|
|
|
static void |
|
|
|
channel_fail_fallen_behind(struct channel *channel, const u8 *msg) |
|
|
|
{ |
|
|
|
if (!fromwire_channeld_fail_fallen_behind(channel, msg, |
|
|
|
cast_const2(struct pubkey **, |
|
|
|
&channel->future_per_commitment_point))) { |
|
|
|
channel_internal_error(channel, |
|
|
|
"bad channel_fail_fallen_behind %s", |
|
|
|
tal_hex(tmpctx, msg)); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
channel_fallen_behind(channel, msg); |
|
|
|
} |
|
|
|
|
|
|
|
static void peer_start_closingd_after_shutdown(struct channel *channel, |
|
|
|
const u8 *msg, |
|
|
|
const int *fds) |
|
|
|