onchaind: handle static_remotekey thresholds.

No longer a global "on" or "off", it depends on the commitment number.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-06-04 14:43:47 +09:30
parent 220b6129bf
commit fa0cd3cc76
8 changed files with 28 additions and 23 deletions

View File

@@ -697,8 +697,8 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
channel->future_per_commitment_point,
&channel->local_funding_pubkey,
&channel->channel_info.remote_fundingkey,
/* FIXME! onchaind needs start numbers! */
channel->static_remotekey_start[LOCAL] == 0,
channel->static_remotekey_start[LOCAL],
channel->static_remotekey_start[REMOTE],
channel->option_anchor_outputs,
is_replay,
feerate_min(ld, NULL));