Send/receive cltv_expiry_delta in open/accept channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-10-09 11:59:57 +10:30
committed by Christian Decker
parent 2a28173891
commit 18e3f9820f
8 changed files with 58 additions and 25 deletions

View File

@@ -2266,7 +2266,8 @@ static bool opening_funder_finished(struct subd *opening, const u8 *resp,
&fc->peer->minimum_depth,
&channel_info->remote_fundingkey,
&funding_txid,
&channel_info->feerate_per_kw)) {
&channel_info->feerate_per_kw,
&channel_info->their_cltv_expiry_delta)) {
peer_internal_error(fc->peer, "bad shutdown_complete: %s",
tal_hex(resp, resp));
return false;
@@ -2387,7 +2388,8 @@ static bool opening_fundee_finished(struct subd *opening,
&peer->push_msat,
&peer->channel_flags,
&channel_info->feerate_per_kw,
&funding_signed)) {
&funding_signed,
&channel_info->their_cltv_expiry_delta)) {
log_broken(peer->log, "bad OPENING_FUNDEE_REPLY %s",
tal_hex(reply, reply));
return false;
@@ -2528,7 +2530,8 @@ void peer_fundee_open(struct peer *peer, const u8 *from_peer,
&peer->our_config,
max_to_self_delay,
min_effective_htlc_capacity_msat,
cs, peer->seed);
cs, peer->seed,
ld->config.min_htlc_expiry);
subd_send_msg(peer->owner, take(msg));
/* FIXME: Expose the min_feerate_per_kw and max_feerate_per_kw in the config */
@@ -2602,7 +2605,8 @@ static bool gossip_peer_released(struct subd *gossip,
&fc->peer->our_config,
max_to_self_delay,
min_effective_htlc_capacity_msat,
&cs, fc->peer->seed);
&cs, fc->peer->seed,
ld->config.min_htlc_expiry);
subd_send_msg(opening, take(msg));